diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-06-19 21:34:51 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-11-06 18:16:32 +1000 |
commit | 652abbacf7b913ef87474df4bcce4fe90aec24a1 (patch) | |
tree | e52defb65f319c48d24db9e14c58237b90aad652 /test/files/pos/t7596c/B_2.scala | |
parent | cd50464cd019bc6a489a72b98293c30b91352bab (diff) | |
download | scala-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/t7596c/B_2.scala')
-rw-r--r-- | test/files/pos/t7596c/B_2.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t7596c/B_2.scala b/test/files/pos/t7596c/B_2.scala new file mode 100644 index 0000000000..33da68c1ff --- /dev/null +++ b/test/files/pos/t7596c/B_2.scala @@ -0,0 +1,9 @@ +object Test { + locally { + Sites: Config.driver.Table + } +} + +// This variation worked by avoiding referring to the +// overloaded term `Config.driver` in the parent type of +// Sites
\ No newline at end of file |