-
Notifications
You must be signed in to change notification settings - Fork 1.1k
ExplicitOuter crash with local class defined in val in trait if the local class extends a path-dependent class #1131
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
Labels
Comments
Note that there's no crash if |
More info, if we print the computing outerpath to trait MustBeATrait from List(method <init>, method inner, method inner, class MustBeATrait, class MustBeATrait, module class <empty>, module class <root>, module class <root>, module class <root>, module class <root>, module class <root>, module class <root>, module class <root>, val <none>, val <none>, val <none>, val <none>)
outer to trait MustBeATrait of this: Outer.this.Inner{...}(this), looking for MustBeATrait$~$anon$$$outer in anonymous class Outer.this.Inner{...}
outer to trait MustBeATrait of this.MustBeATrait$~$anon$$$outer(): MustBeATrait, looking for MustBeATrait$$$outer in trait MustBeATrait
computing outerpath to anonymous class Outer.this.Inner{...} from List(class MustBeATrait, class MustBeATrait, class MustBeATrait, module class <empty>, module class <root>, module class <root>, module class <root>, module class <root>, module class <root>, module class <root>, module class <root>, val <none>, val <none>, val <none>, val <none>)
outer to anonymous class Outer.this.Inner{...} of this: MustBeATrait(MustBeATrait.this), looking for MustBeATrait$$$outer in trait MustBeATrait The last two lines do not appear and there's no crash if we replace |
It also happens with non-anonymous local classes: class Outer {
class Inner
}
trait MustBeATrait {
val o = new Outer
val inner = {
class A extends o.Inner
new A
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fails with
assertion failed: asTerm called on not-a-Term val <none>
somewhere inExplicitOuter
.Stack trace: https://gist.github.com/smarter/992bb93f2d0f2705a6a6
The text was updated successfully, but these errors were encountered: