summaryrefslogtreecommitdiff
path: root/test/files/pos/t8054.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-12-09 08:13:05 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-12-09 08:31:04 +0100
commit369f370b1e894893d315de3bd861c9292695f71d (patch)
treeb79b6c10ef770d768372cf95c716e203963da82f /test/files/pos/t8054.scala
parent7d28c4966e5b32b46fda927f303aea4af20c4517 (diff)
downloadscala-369f370b1e894893d315de3bd861c9292695f71d.tar.gz
scala-369f370b1e894893d315de3bd861c9292695f71d.tar.bz2
scala-369f370b1e894893d315de3bd861c9292695f71d.zip
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?
Diffstat (limited to 'test/files/pos/t8054.scala')
-rw-r--r--test/files/pos/t8054.scala31
1 files changed, 31 insertions, 0 deletions
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
+ }
+}