aboutsummaryrefslogtreecommitdiff
path: root/test/dotc/tests.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 /test/dotc/tests.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 'test/dotc/tests.scala')
-rw-r--r--test/dotc/tests.scala17
1 files changed, 5 insertions, 12 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index 3babe7bc6..1a9d19913 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -56,7 +56,6 @@ class tests extends CompilerTest {
@Test def pos_overrides() = compileFile(posDir, "overrides")
@Test def pos_javaOverride() = compileDir(posDir + "java-override")
@Test def pos_templateParents() = compileFile(posDir, "templateParents")
- @Test def pos_structural() = compileFile(posDir, "structural")
@Test def pos_overloadedAccess = compileFile(posDir, "overloadedAccess")
@Test def pos_approximateUnion = compileFile(posDir, "approximateUnion")
@Test def pos_tailcall = compileDir(posDir + "tailcall/")
@@ -87,16 +86,10 @@ class tests extends CompilerTest {
@Test def neg_over = compileFile(negDir, "over", xerrors = 3)
@Test def neg_overrides = compileFile(negDir, "overrides", xerrors = 11)
@Test def neg_projections = compileFile(negDir, "projections", xerrors = 1)
- @Test def neg_i39 = compileFile(negDir, "i39", xerrors = 1)
- @Test def neg_i50_volatile = compileFile(negDir, "i50-volatile", xerrors = 4)
+ @Test def neg_i39 = compileFile(negDir, "i39", xerrors = 2)
+ @Test def neg_i50_volatile = compileFile(negDir, "i50-volatile", xerrors = 6)
@Test def neg_t0273_doubledefs = compileFile(negDir, "t0273", xerrors = 1)
- @Test def neg_t0586_structural = compileFile(negDir, "t0586", xerrors = 1)
- @Test def neg_t0625_structural = compileFile(negDir, "t0625", xerrors = 1)(
- defaultOptions = noCheckOptions)
- // -Ycheck fails because there are structural types involving higher-kinded types.
- // these are illegal, but are tested only later.
- @Test def neg_t1131_structural = compileFile(negDir, "t1131", xerrors = 1)
- @Test def neg_zoo = compileFile(negDir, "zoo", xerrors = 1)
+ @Test def neg_zoo = compileFile(negDir, "zoo", xerrors = 12)
@Test def neg_t1192_legalPrefix = compileFile(negDir, "t1192", xerrors = 1)
@Test def neg_tailcall_t1672b = compileFile(negDir, "tailcall/t1672b", xerrors = 6)
@Test def neg_tailcall_t3275 = compileFile(negDir, "tailcall/t3275", xerrors = 1)
@@ -108,13 +101,13 @@ class tests extends CompilerTest {
@Test def neg_t1843_variances = compileFile(negDir, "t1843-variances", xerrors = 1)
@Test def neg_t2660_ambi = compileFile(negDir, "t2660", xerrors = 2)
@Test def neg_t2994 = compileFile(negDir, "t2994", xerrors = 2)
- @Test def neg_subtyping = compileFile(negDir, "subtyping", xerrors = 2)
+ @Test def neg_subtyping = compileFile(negDir, "subtyping", xerrors = 4)
@Test def neg_variances = compileFile(negDir, "variances", xerrors = 2)
@Test def neg_badAuxConstr = compileFile(negDir, "badAuxConstr", xerrors = 2)
@Test def neg_typetest = compileFile(negDir, "typetest", xerrors = 1)
@Test def neg_t1569_failedAvoid = compileFile(negDir, "t1569-failedAvoid", xerrors = 1)
@Test def neg_cycles = compileFile(negDir, "cycles", xerrors = 8)
- @Test def neg_boundspropagation = compileFile(negDir, "boundspropagation", xerrors = 4)
+ @Test def neg_boundspropagation = compileFile(negDir, "boundspropagation", xerrors = 5)
@Test def neg_refinedSubtyping = compileFile(negDir, "refinedSubtyping", xerrors = 2)
@Test def neg_i0091_infpaths = compileFile(negDir, "i0091-infpaths", xerrors = 3)
@Test def neg_i0248_inherit_refined = compileFile(negDir, "i0248-inherit-refined", xerrors = 4)