diff --git a/tests/pos/13855.scala b/tests/pos/13855.scala new file mode 100644 index 000000000000..7c093ed98409 --- /dev/null +++ b/tests/pos/13855.scala @@ -0,0 +1,13 @@ +type A[X] = X match + case Int => Int + case _ => B[X] + +def a[X](x: X): A[X] = x match + case v: Int => v + case _ => b(x) + +type B[X] = X match + case String => String + +def b[X](x: X): B[X] = x match + case v: String => v