From a44082fd7d97e7adb839540d770b5f77b4a150a1 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 19 Mar 2016 19:50:18 +0100 Subject: Add test for #1181 to pending --- tests/pending/pos/i1181.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/pending/pos/i1181.scala (limited to 'tests/pending/pos/i1181.scala') diff --git a/tests/pending/pos/i1181.scala b/tests/pending/pos/i1181.scala new file mode 100644 index 000000000..057c938d3 --- /dev/null +++ b/tests/pending/pos/i1181.scala @@ -0,0 +1,12 @@ +object Test { + def foo[M[_]](x: M[Int]) = x + + type Alias[A] = (A, A) + val x: Alias[Int] = (1, 2) + + foo[Alias](x) // ok + foo(x) // ok in scalac but fails in dotty with: + // error: type mismatch: + // found : (Int, Int) + // required: M[Int] +} -- cgit v1.2.3