aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-07-19 17:58:11 +0200
committerGitHub <noreply@github.com>2016-07-19 17:58:11 +0200
commit2193100a4617033d75f0b924a5347a02d5e8481d (patch)
treea97f77c04e75f0740a27215fd2f4a9cb1d8aaf83 /tests
parent5d6c1020e0dd24c10e2a5827f5b7a89bfa925e09 (diff)
parent6c263447cfaea86979b1e41d687e312204430a33 (diff)
downloaddotty-2193100a4617033d75f0b924a5347a02d5e8481d.tar.gz
dotty-2193100a4617033d75f0b924a5347a02d5e8481d.tar.bz2
dotty-2193100a4617033d75f0b924a5347a02d5e8481d.zip
Merge pull request #1400 from dotty-staging/fix/hk-reduce-typerefs
HK reduction: Remove special-case for typerefs
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/i1181b.scala11
-rw-r--r--tests/pos/i1181c.scala11
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/pos/i1181b.scala b/tests/pos/i1181b.scala
new file mode 100644
index 000000000..7694aed0b
--- /dev/null
+++ b/tests/pos/i1181b.scala
@@ -0,0 +1,11 @@
+class Foo[A]
+
+object Test {
+ def foo[M[_,_]](x: M[Int,Int]) = x
+
+ type Alias[X,Y] = Foo[X]
+ val x: Alias[Int,Int] = new Foo[Int]
+
+ foo[Alias](x) // ok
+ foo(x)
+}
diff --git a/tests/pos/i1181c.scala b/tests/pos/i1181c.scala
new file mode 100644
index 000000000..940629259
--- /dev/null
+++ b/tests/pos/i1181c.scala
@@ -0,0 +1,11 @@
+class Foo[A]
+
+trait Bar[DD[_,_]] {
+ val x: DD[Int, Int]
+}
+
+trait Baz extends Bar[[X,Y] -> Foo[X]] {
+ def foo[M[_,_]](x: M[Int, Int]) = x
+
+ foo(x)
+}