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
Scala compiler crashes during lamdalift due to assertion failure #6562
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6562?orig=1
|
Robby (robby) said: |
@retronym said: |
@retronym said: retronym/scala@2.10.0-wip...ticket/6562
The suggestion box awaits your comments. |
@retronym said: |
@retronym said (edited on Oct 27, 2012 7:32:48 AM UTC): case Select(qual, name) =>
- /** return closest enclosing method, unless shadowed by an enclosing class;
- * no use of closures here in the interest of speed.
- */
- def closestEnclMethod(from: Symbol): Symbol =
- if (from.isSourceMethod) from
- else if (from.isClass) NoSymbol
- else closestEnclMethod(from.owner)
-
- if (currentClass != sym.owner ||
- (closestEnclMethod(currentOwner) hasAnnotation ScalaInlineClass))
+ if (currentClass != sym.owner)
sym.makeNotPrivate(sym.owner) With scala/scala@5d4e4e2 (the point of the regression, and a seeming half-reversion of e6b4204604). - if (currentClass != sym.owner)
+ // make not private symbol acessed from inner classes, as well as
+ // symbols accessed from @inline methods
+ if (currentClass != sym.owner ||
+ (sym.owner.enclMethod hasAnnotation ScalaInlineClass)) Martin reasoned:
Later, the inliner was changed:
So we've got the changes to |
@retronym said: |
@retronym said (edited on Oct 27, 2012 6:37:29 PM UTC): https://github.com/retronym/scala/tree/ticket/6562-2 But before submitting a PR, I'm going to try to create a test case for the problem Miguel described: https://groups.google.com/d/msg/scala-internals/iPkMCygzws4/hjosnYfLMicJ |
@retronym said: retronym/scala@2.10.0-wip...ticket/6562-3 I suspect there are subtle issues with binary compatibility if we defer this change to 2.10.1. The assumptions that we have encoded into Perhaps we could harden things by validating those assumptions (checking the Java types), or offering the improvements behind a -Y option for use only by people with homogenenously compiled libraries. |
@odersky said: Thanks
|
@retronym said (edited on Oct 30, 2012 5:44:11 PM UTC):
I'll commit the failing test case to the branch tonight to make this clearer. I'm also worried about references to package-qualified private members of other compilation units. |
@retronym said: My concern about qualified private members was misplaced: these are already !isPrivate, and as such not subject to the whims of |
@retronym said:
A tentative fix drawn from the fragile basket: |
@retronym said: |
@adriaanm said: |
The following code causes the compiler to crash. When the @inline annotation is removed, the compiler seems to work ok.
The text was updated successfully, but these errors were encountered: