-
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 MT separate compilation bug (#18398)
- Loading branch information
Showing
6 changed files
with
39 additions
and
1 deletion.
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,5 @@ | ||
type Id[T] = Any match { case Any => T } | ||
|
||
class Foo[A] | ||
object Foo: | ||
given inst[X, Y <: Id[X]]: Foo[Y] = new Foo[Y] |
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,4 @@ | ||
class Test: | ||
def test: Unit = | ||
summon[Foo[Int]] | ||
summon[Foo[Long]] |
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,7 @@ | ||
trait DFBits[W <: Int] | ||
|
||
trait Candidate[R]: | ||
type OutW <: Int | ||
object Candidate: | ||
given [W <: Int, R <: Foo[DFBits[W]]]: Candidate[R] with | ||
type OutW = W |
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,2 @@ | ||
type Foo[T] = T match | ||
case Any => T |
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,5 @@ | ||
def baz[L](lhs: L)(using icL: Candidate[L]): DFBits[Int] = ??? | ||
object Test: | ||
val x: DFBits[8] = ??? | ||
val z: DFBits[Int] = baz(x) | ||
summon[Candidate[z.type]] |