Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regression: case class over existential #9326

Closed
scabug opened this issue May 25, 2015 · 4 comments
Closed

regression: case class over existential #9326

scabug opened this issue May 25, 2015 · 4 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented May 25, 2015

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)
@scabug
Copy link
Author

scabug commented May 25, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9326?orig=1
Reporter: @retronym
Affected Versions: 2.12.0-M1

@scabug
Copy link
Author

scabug commented May 25, 2015

@retronym said:
Regressed in scala/scala@51745c0

@scabug
Copy link
Author

scabug commented May 26, 2015

@adriaanm said:
scala/scala#4521

@scabug scabug closed this as completed May 26, 2015
@scabug
Copy link
Author

scabug commented May 26, 2015

@adriaanm said:
Thanks for the consistency check, AP!

@scabug scabug added this to the 2.12.0-M2 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants