-
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.
Don't add tracked to PrivateLocal witnesses
- Loading branch information
1 parent
9231b69
commit 7442d5a
Showing
2 changed files
with
45 additions
and
23 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 @@ | ||
import scala.language.experimental.modularity | ||
|
||
trait T: | ||
type Self | ||
type X | ||
def foo: Self | ||
|
||
class D[C](using wd: C is T) | ||
class E(using we: Int is T) | ||
|
||
def Test = | ||
given w: Int is T: | ||
def foo: Int = 42 | ||
type X = Long | ||
val d = D(using w) | ||
summon[d.wd.X =:= Long] // error | ||
val e = E(using w) | ||
summon[e.we.X =:= Long] // error |