Skip to content

Commit 46d1324

Browse files
oderskytanishiking
authored andcommitted
Test for scala#12945
1 parent 56a7b5f commit 46d1324

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/pos/i12945/A_1.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
opaque type Lie[W <: Int] = Int
2+
object Lie:
3+
trait TC[-T]:
4+
type Out
5+
object TC:
6+
given [W <: Int]: TC[Lie[W]] with
7+
type Out = W
8+
9+
val x = summon[Lie.TC[Lie[7]]]
10+
val works = summon[x.Out =:= 7]

tests/pos/i12945/B_2.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
object Test:
2+
val x = summon[Lie.TC[Lie[7]]]
3+
val fails = summon[x.Out =:= 7]

0 commit comments

Comments
 (0)