diff options
Diffstat (limited to 'tests/pos/param-depmeth.scala')
-rw-r--r-- | tests/pos/param-depmeth.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pos/param-depmeth.scala b/tests/pos/param-depmeth.scala new file mode 100644 index 000000000..2e887d181 --- /dev/null +++ b/tests/pos/param-depmeth.scala @@ -0,0 +1,15 @@ +object Test { + + class C { type T } + + def f(x: C, y: x.T): x.T = y // ok + + val c = new C { type T = String } + val c2 = c + + f(c, "abc") + f(new C{ type T = String}, "abc") + + val d: (C{ type T = String}) # T = "abc" + +} |