-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15592 from dotty-staging/fix-15374
Fix #15374: Make sure prefix of outer select has the correct class symbol
- Loading branch information
Showing
2 changed files
with
31 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
class A(val x: Int): | ||
class X: | ||
inline def foo() = A.this.foo() | ||
|
||
private def foo(): Int = x | ||
|
||
class B extends A(20): | ||
val a = new A(10) | ||
val y: Y = new Y | ||
|
||
class Y extends a.X | ||
|
||
class C: | ||
var b = new B | ||
assert(b.y.foo() == 10) | ||
|
||
@main | ||
def Test = new C() |