diff options
Diffstat (limited to 'tests/neg/i1050a.scala')
-rw-r--r-- | tests/neg/i1050a.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/neg/i1050a.scala b/tests/neg/i1050a.scala index 47e2f0c59..4fea5e3b1 100644 --- a/tests/neg/i1050a.scala +++ b/tests/neg/i1050a.scala @@ -1,12 +1,13 @@ +// i1050 checks failing at refchecks object Tiark1 { trait A { type L <: Nothing } trait B { type L >: Any} trait U { val p: B - def brand(x: Any): p.L = x // error: not final + def brand(x: Any): p.L = x } trait V extends U { - lazy val p: A & B = ??? + lazy val p: A & B = ??? // error: may not override } val v = new V {} v.brand("boom!") @@ -17,11 +18,11 @@ object Tiark2 { trait U { type X <: B val p: X - def brand(x: Any): p.L = x // error: not final + def brand(x: Any): p.L = x } trait V extends U { type X = B & A - lazy val p: X = ??? + lazy val p: X = ??? // error: may not override } val v = new V {} v.brand("boom!"): Nothing |