diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/i1181b.scala | 11 | ||||
-rw-r--r-- | tests/pos/i1181c.scala | 11 |
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) +} |