diff options
Diffstat (limited to 'tests/pos/t8046c.scala')
-rw-r--r-- | tests/pos/t8046c.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/pos/t8046c.scala b/tests/pos/t8046c.scala new file mode 100644 index 000000000..f05b4c15b --- /dev/null +++ b/tests/pos/t8046c.scala @@ -0,0 +1,19 @@ +trait One { + type Op[A] + type Alias[A] = Op[A] +} + +trait Three extends One { + trait Op[A] extends (A => A) + + def f1(f: Op[Int]) = f(5) + def f2(f: Alias[Int]) = f(5) + def f3[T <: Op[Int]](f: T) = f(5) + def f4[T <: Alias[Int]](f: T) = f(5) + // ./a.scala:12: error: type mismatch; + // found : Int(5) + // required: T1 + // def f4[T <: Alias[Int]](f: T) = f(5) + // ^ +} + |