From c24447d37fad5dda7ff91b3fe3fcd522a6520b16 Mon Sep 17 00:00:00 2001 From: Olivier Blanvillain Date: Wed, 26 Jan 2022 11:33:27 +0100 Subject: [PATCH] Fix #13855: Add regression test --- tests/pos/13855.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/pos/13855.scala 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