forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine checking for outer references
Outer references should also count anywhere in a type if we are in the scope of an inline method. Expansions of calls to these methods will have to reference these types using outer accessors. Fixes scala#16119
- Loading branch information
1 parent
bc55b64
commit 6414d89
Showing
2 changed files
with
94 additions
and
52 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,16 @@ | ||
class Foo: | ||
self => | ||
type T = this.type | ||
val foo: T = ??? | ||
object bar: | ||
inline def baz(): Any = | ||
??? : T | ||
|
||
bar.baz() | ||
|
||
class Foo2: | ||
self => | ||
object bar: | ||
inline def baz(): Any = ??? : self.type | ||
|
||
bar.baz() |