diff options
author | Martin Odersky <odersky@gmail.com> | 2015-02-12 11:28:35 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-18 11:09:43 +0100 |
commit | 61cb51acaedbe603add8c4af9e390a27f8b33f09 (patch) | |
tree | 2e6f7d2410b96b208b3f6be5c5465a320751d7f0 /tests/pos/t1053.scala | |
parent | 3f5d15defa7481da1b9d1f20e91569a340c71e8e (diff) | |
download | dotty-61cb51acaedbe603add8c4af9e390a27f8b33f09.tar.gz dotty-61cb51acaedbe603add8c4af9e390a27f8b33f09.tar.bz2 dotty-61cb51acaedbe603add8c4af9e390a27f8b33f09.zip |
Disallow refinements of types or methods that do not appear in parent.
We planned this for a long time but never implemented it. Instead, we sometimes
issued an erro in Splitter, namely if reflection would have been needed to access the
member. It turns out that some tests (e.g. neg/t625) fail -Ycheck (we knew that before
and disabled) but also fail Pickling because they generate orhpan PolyParams. So rather
than patching this up it seems now is a good time to enforce the restriction for real.
Diffstat (limited to 'tests/pos/t1053.scala')
-rw-r--r-- | tests/pos/t1053.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/pos/t1053.scala b/tests/pos/t1053.scala index 1d4dfb637..2c5dc1d5a 100644 --- a/tests/pos/t1053.scala +++ b/tests/pos/t1053.scala @@ -1,6 +1,7 @@ trait T[A] { trait U { type W = A; val x = 3 } } +trait Base { type V } object Test { - val x : ({ type V = T[this.type] })#V = null + val x : (Base { type V = T[this.type] })#V = null val y = new x.U { } } |