aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i1181.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-07-15 13:11:52 +0200
committerGitHub <noreply@github.com>2016-07-15 13:11:52 +0200
commit409c6c30c8496529aace68967acccf88850145da (patch)
tree56fd30bbb5d108b895982da72943e649a58fbd40 /tests/pos/i1181.scala
parent1c02c56213cf22010c0aef1dc1446300fe8005fe (diff)
parent894c9fbf247765041fc32788c78b85f1b2b2a191 (diff)
downloaddotty-409c6c30c8496529aace68967acccf88850145da.tar.gz
dotty-409c6c30c8496529aace68967acccf88850145da.tar.bz2
dotty-409c6c30c8496529aace68967acccf88850145da.zip
Merge pull request #1343 from dotty-staging/change-hk-direct2
Direct representation of higher-kinded types
Diffstat (limited to 'tests/pos/i1181.scala')
-rw-r--r--tests/pos/i1181.scala12
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]
+}