diff options
Diffstat (limited to 'tests/untried/pos/t4018.scala')
-rw-r--r-- | tests/untried/pos/t4018.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/untried/pos/t4018.scala b/tests/untried/pos/t4018.scala new file mode 100644 index 000000000..2b265c571 --- /dev/null +++ b/tests/untried/pos/t4018.scala @@ -0,0 +1,15 @@ +trait M[V[_]] + +class Cls[V[_]](c: M[V]) + +object Cls{ + def apply[V[_]](c: M[V]): Cls[V] = new Cls[V](c) +} + +object test { + val c: M[Option] = new M[Option] {} + new Cls(c) // does not infer. + new Cls[Option](c) // okay + Cls(c) // okay +} + |