-
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 (bis)
- Loading branch information
Showing
6 changed files
with
34 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,7 @@ | ||
trait VAL | ||
|
||
type Foo[T, M] = M match { case VAL => T } | ||
|
||
class Cand[A] | ||
object Cand: | ||
given inst[X, Y <: Foo[X, VAL]]: Cand[Y] = new Cand[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[Cand[Int]] | ||
summon[Cand[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], VAL]]: 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,4 @@ | ||
trait VAL | ||
|
||
type Foo[T, M] = M match | ||
case VAL => 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]] |