From 369f370b1e894893d315de3bd861c9292695f71d Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 9 Dec 2013 08:13:05 +0100 Subject: SI-8054 Fix regression in TypeRef rebind with val overriding object Regressed in 80767383fd / SI-7928 The condition added in that commit are necessary after refchecks but poisonous before. This still seems rather fragile: I wonder if `eliminateModuleDefs` in `RefChecks` ought to flag the module symbol as `ARTIFACT` after creating the accessor, so as to signal that it shouldn't be bound anymore? --- test/files/pos/t8054.scala | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/files/pos/t8054.scala (limited to 'test/files/pos/t8054.scala') diff --git a/test/files/pos/t8054.scala b/test/files/pos/t8054.scala new file mode 100644 index 0000000000..a7bb44b1ed --- /dev/null +++ b/test/files/pos/t8054.scala @@ -0,0 +1,31 @@ +trait D { + trait Manifest { + class Entry + } + + val M: Manifest + + def m: M.Entry = ??? +} + +object D1 extends D { + object M extends Manifest +} + +object D2 extends D { + val M: Manifest = ??? +} + +object Hello { + + def main(args: Array[String]) { + // 2.10.3 - ok + // 2.11.0-M7 - type mismatch; found : Seq[DB1.MANIFEST.Entry] + // required: Seq[DB1.MANIFEST.Entry] + val t1: D1.M.Entry = D1.m + + // 2.10.3 - ok + // 2.11.0-M7 - ok + val t2: D2.M.Entry = D2.m + } +} -- cgit v1.2.3