summaryrefslogtreecommitdiff
path: root/test/files/pos/t7596b/B.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-06-19 21:34:51 +0200
committerJason Zaugg <jzaugg@gmail.com>2014-11-06 18:16:32 +1000
commit652abbacf7b913ef87474df4bcce4fe90aec24a1 (patch)
treee52defb65f319c48d24db9e14c58237b90aad652 /test/files/pos/t7596b/B.scala
parentcd50464cd019bc6a489a72b98293c30b91352bab (diff)
downloadscala-652abbacf7b913ef87474df4bcce4fe90aec24a1.tar.gz
scala-652abbacf7b913ef87474df4bcce4fe90aec24a1.tar.bz2
scala-652abbacf7b913ef87474df4bcce4fe90aec24a1.zip
SI-7596 Curtail overloaded symbols during unpickling
In code like: object O { val x = A; def x(a: Any) = ... } object P extends O.x.A The unpickler was using an overloaded symbol for `x` in the parent type of `P`. This led to compilation failures under separate compilation. The code that leads to this is in `Unpicklers`: def fromName(name: Name) = name.toTermName match { case nme.ROOT => loadingMirror.RootClass case nme.ROOTPKG => loadingMirror.RootPackage case _ => adjust(owner.info.decl(name)) } This commit filters the overloaded symbol based its stability unpickling a singleton type. That seemed a slightly safer place than in `fromName`.
Diffstat (limited to 'test/files/pos/t7596b/B.scala')
-rw-r--r--test/files/pos/t7596b/B.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/pos/t7596b/B.scala b/test/files/pos/t7596b/B.scala
new file mode 100644
index 0000000000..cbcf149c23
--- /dev/null
+++ b/test/files/pos/t7596b/B.scala
@@ -0,0 +1,6 @@
+class DAOBase[E]{
+ type TableType <: Config.driver.Table[E]
+}
+class SitesDAO extends DAOBase[String]{
+ type TableType = Sites
+}