Scala Programming Language
  1. Scala Programming Language
  2. SI-4757

Nonexisting symbol error with separate compilation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.9.0
    • Fix Version/s: None
    • Component/s: Misc Compiler
    • Labels:
      None

      Description

      To reproduce, compile the following sources in this order in separate compilations: P.scala, A.scala, and then B.scala. When compiling B.scala, an error message is generated:

      error: class file needed by A is missing.
      reference type _$2 of (t: <?>)(ss: <?>)Seq[S[_]] refers to nonexisting symbol.
      

      P.scala:

      trait S[T]
      
      object P {
        def x(t: Int)(ss: Seq[S[_]]): Seq[S[_]] = ss
      }
      

      A.scala

      object A {
        def ss = P.x(3)(Nil)
      }
      

      B.scala:

      object C {
        def x: Seq[S[_]] = A.ss
      }
      

      No error is generated if P.scala and A.scala are compiled together.

        Activity

        Hide
        Commit Message Bot added a comment -

        (extempore in r25219) Existentially quantified symbols, when read by the unpickler, do not
        have the existential flag set. This leads to failure. This patch
        seeks improvement. Closes #4757, review by odersky.

        Show
        Commit Message Bot added a comment - (extempore in r25219 ) Existentially quantified symbols, when read by the unpickler, do not have the existential flag set. This leads to failure. This patch seeks improvement. Closes #4757, review by odersky.
        Hide
        Commit Message Bot added a comment -

        (extempore in r25220) Test case for #4757, no review.

        Show
        Commit Message Bot added a comment - (extempore in r25220 ) Test case for #4757, no review.

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Mark Harrah
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development