-
Notifications
You must be signed in to change notification settings - Fork 1.1k
$outer of trait not implemented if the class doesn't need $outer #1820
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
Comments
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 17, 2016
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 19, 2016
Previously, we don't generate `outer` for the annoymous class `Inner3`, because it doesn't reference the symbol `B`. This is incorrect, as `Inner3` extends `A`, which requires an outer. trait A { val a = "a" trait Inner { def f = println(a) def h = 3 } } trait B extends A { trait Inner2 extends Inner class Inner3 extends Inner2 }
Fixing the above issue expose another issue about We should generate an trait A {
val a = "a"
trait Inner {
def f = println(a)
def h = 3
}
}
trait B extends A {
trait Inner2 extends Inner
new Inner2 {}
} |
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 19, 2016
Previously, we don't generate `outer` for the class `Inner3`, because it doesn't reference the symbol `B`. This is incorrect, as `Inner3` extends `A.Inner`, which requires an outer. trait A { val a = "a" trait Inner { def f = println(a) def h = 3 } } trait B extends A { trait Inner2 extends Inner class Inner3 extends Inner2 }
liufengyun
added a commit
to dotty-staging/dotty
that referenced
this issue
Dec 19, 2016
Previously, we don't generate `outer` for the anonymous class `new Inner2 {}`. This is incorrect, as `Inner2 {}` extends `A.Inner`, which requires an outer. trait A { val a = "a" trait Inner { def f = println(a) def h = 3 } } trait B extends A { trait Inner2 extends Inner new Inner2 {} }
odersky
added a commit
that referenced
this issue
Dec 20, 2016
Fix #1820: make sure outer of traits implemented
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following code runs in Scalac, but failed to run in Dotty. Inspecting the generated code shows that the
$outer
forA.Inner
is not implemented in the top-leve classInner
.A fix is in order, will push soon.
The text was updated successfully, but these errors were encountered: