-
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.
Fix #15374: Make sure prefix of outer select has the correct class sy…
…mbol If we have an outer select `e.outer_<hops>`, we must make sure that the class symbol of `e` is the class where the outer this is located in. Otherwise, the phase `ElimOuterSelect` would get confused. Co-authored-by: Dale Wijnand <dale.wijnand@gmail.com>
- Loading branch information
1 parent
c37175b
commit b976b5b
Showing
2 changed files
with
30 additions
and
6 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() |