diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-07-12 18:16:53 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-07-12 18:16:53 +0100 |
commit | 7df0fa52ade1e4cfe3d50a9ea7e5adf2d8c161c0 (patch) | |
tree | c2c460fef330d9d60cfb9b56238482671ceb958a /tests/pos/i1181.scala | |
parent | c7f3b45abf221c432b3fbd7462741b00a9e10142 (diff) | |
download | dotty-7df0fa52ade1e4cfe3d50a9ea7e5adf2d8c161c0.tar.gz dotty-7df0fa52ade1e4cfe3d50a9ea7e5adf2d8c161c0.tar.bz2 dotty-7df0fa52ade1e4cfe3d50a9ea7e5adf2d8c161c0.zip |
Enable test for fixed #1181: Typer should preserve aliases in TypeTrees
This was fixed two commits ago.
Diffstat (limited to 'tests/pos/i1181.scala')
-rw-r--r-- | tests/pos/i1181.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/i1181.scala b/tests/pos/i1181.scala new file mode 100644 index 000000000..057c938d3 --- /dev/null +++ b/tests/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] +} |