diff --git a/tests/pos/12944/12944_1.scala b/tests/pos/12944/12944_1.scala new file mode 100644 index 000000000000..e6b6286c43a3 --- /dev/null +++ b/tests/pos/12944/12944_1.scala @@ -0,0 +1,11 @@ +object Test1 { + type ++[L, R] = (L, R) match + case (Int, Int) => 2 + case (String, String) => "2" + case (String, Int) => "2" + case (Int, String) => "2" + + type Bar[W <: Int] = W ++ "" ++ W + + val works = summon[Bar[2] =:= "2"] +} diff --git a/tests/pos/12944/12944_2.scala b/tests/pos/12944/12944_2.scala new file mode 100644 index 000000000000..cb471a59d191 --- /dev/null +++ b/tests/pos/12944/12944_2.scala @@ -0,0 +1,5 @@ +import Test1._ + +object Test2 { + val fails = summon[Bar[2] =:= "2"] +}