Skip to content

Commit 6b721b6

Browse files
Merge pull request #13636 from dotty-staging/fix-12944
Fix #12944: Add regression test
2 parents 45a9b3c + 38ba1d5 commit 6b721b6

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

tests/pos/12944/12944_1.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
object Test1 {
2+
type ++[L, R] = (L, R) match
3+
case (Int, Int) => 2
4+
case (String, String) => "2"
5+
case (String, Int) => "2"
6+
case (Int, String) => "2"
7+
8+
type Bar[W <: Int] = W ++ "" ++ W
9+
10+
val works = summon[Bar[2] =:= "2"]
11+
}

tests/pos/12944/12944_2.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Test1._
2+
3+
object Test2 {
4+
val fails = summon[Bar[2] =:= "2"]
5+
}

0 commit comments

Comments
 (0)