Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Scala 2.12.0-M1
    • Fix Version/s: Scala 2.12.0-M2
    • Component/s: Type Checker
    • Labels:
      None

      Description

      package test
       
      case class C(data: Iterator[_])
      

      % scalac-hash v2.11.6 sandbox/test.scala
      % scalac-hash v2.12.0-M1 sandbox/test.scala
      sandbox/test.scala:3: error: object package is not a member of package test
      case class C(data: Iterator[_])
                                  ^
      one error found
      

      Haven't bisected the point of regression yet.

      This patch fixes it:

      diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
      index d5a3fba..660cab8 100644
      --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
      +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
      @@ -996,6 +996,7 @@ trait Contexts { self: Analyzer =>
                  s.owner.isClass
               && !s.owner.isPackageClass
               && !s.isTypeParameterOrSkolem
      +        && !s.isExistentiallyBound
             )
             def lookupInPrefix(name: Name)    = pre member name filter qualifies
             def accessibleInPrefix(s: Symbol) = isAccessible(s, pre, superAccess = false)
      

        Attachments

          Activity

          Show
          retronym Jason Zaugg added a comment - Regressed in https://github.com/scala/scala/commit/51745c06f318f859b313c8257a41221837671ac1
          Show
          moors Adriaan Moors added a comment - https://github.com/scala/scala/pull/4521
          Hide
          moors Adriaan Moors added a comment -

          Thanks for the consistency check, AP!

          Show
          moors Adriaan Moors added a comment - Thanks for the consistency check, AP!

            People

            • Assignee:
              retronym Jason Zaugg
              Reporter:
              retronym Jason Zaugg
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: