forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle ownership changes in InlineTyper
Fixes a part of scala#13334 which now works for `transparent inline`.
- Loading branch information
Showing
3 changed files
with
51 additions
and
17 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
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,23 @@ | ||
class Bar | ||
|
||
transparent inline def bar(i: Int): Bar = | ||
new Bar: | ||
def j = i | ||
|
||
class Foo(x: Int): | ||
def foo = bar(x) | ||
|
||
trait DFC | ||
given DFC = new DFC {} | ||
|
||
trait TC | ||
object TC: | ||
def foo()(using DFC): Unit = {} | ||
|
||
transparent inline given (using DFC): TC = new TC: | ||
foo() | ||
|
||
class Baz(using DFC): | ||
summon[TC] | ||
|
||
val top = new Baz |