diff options
Diffstat (limited to 'tests/pending/pos/t6575a.scala')
-rw-r--r-- | tests/pending/pos/t6575a.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pending/pos/t6575a.scala b/tests/pending/pos/t6575a.scala new file mode 100644 index 000000000..f128714da --- /dev/null +++ b/tests/pending/pos/t6575a.scala @@ -0,0 +1,15 @@ +trait X { def foo: PartialFunction[Int, Int] } + +trait Y extends X { + // Inferred type was AbstractPartialFunction[Int, Int] with Serializable + abstract override def foo = { case i => super.foo(i) * 2 } +} +trait Z extends X { + // ditto + abstract override def foo = { case i => super.foo(i) + 3 } +} + +trait Comb extends Y with Z { + // ... which led to a type error here. + abstract override def foo: PartialFunction[Int, Int] = { case i => super.foo(i) - 2 } +} |