aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-02-12 11:28:35 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-03-18 11:09:43 +0100
commit61cb51acaedbe603add8c4af9e390a27f8b33f09 (patch)
tree2e6f7d2410b96b208b3f6be5c5465a320751d7f0 /tests/pos/typers.scala
parent3f5d15defa7481da1b9d1f20e91569a340c71e8e (diff)
downloaddotty-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/typers.scala')
-rw-r--r--tests/pos/typers.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/pos/typers.scala b/tests/pos/typers.scala
index fe11ca602..7f67d2c72 100644
--- a/tests/pos/typers.scala
+++ b/tests/pos/typers.scala
@@ -88,6 +88,7 @@ object typers {
}
class Refinements {
+ trait C { type T; def process(x: T): Int }
val y: C { type T; val key: T; def process(x: T): Int } = ???
}