diff options
author | Martin Odersky <odersky@gmail.com> | 2015-02-24 22:41:37 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-02-24 22:41:37 +0100 |
commit | 379fd874eb9620a9df74bd395cea32698e94acc9 (patch) | |
tree | e61cec60e18fac0134b5fd45e7ab32719a7506f7 /src/dotty/tools/dotc/core/pickling | |
parent | 37947a09d59824f7e281be4a81295844095f11e4 (diff) | |
download | dotty-379fd874eb9620a9df74bd395cea32698e94acc9.tar.gz dotty-379fd874eb9620a9df74bd395cea32698e94acc9.tar.bz2 dotty-379fd874eb9620a9df74bd395cea32698e94acc9.zip |
Fix for #371
This causes backend to fail with ambiguous reference when loading
member "equals" of object "BoxesRuntime".
The reference is indeed ambiguous. BoxesRunTime has a two paremeter
equals method and, with the fix, inherits the one-parameter method from
Object. The backend needs to disambiguate, e.g. by demanding the `decl`
equals in BoxesRunTime instead of the member.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/UnPickler.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/UnPickler.scala b/src/dotty/tools/dotc/core/pickling/UnPickler.scala index 160bf620c..170ebd28b 100644 --- a/src/dotty/tools/dotc/core/pickling/UnPickler.scala +++ b/src/dotty/tools/dotc/core/pickling/UnPickler.scala @@ -106,7 +106,8 @@ object UnPickler { case TempPolyType(tps, cinfo) => (tps, cinfo) case cinfo => (Nil, cinfo) } - val parentRefs = ctx.normalizeToClassRefs(parents, cls, decls) + var parentRefs = ctx.normalizeToClassRefs(parents, cls, decls) + if (parentRefs.isEmpty) parentRefs = defn.ObjectClass.typeRef :: Nil for (tparam <- tparams) { val tsym = decls.lookup(tparam.name) if (tsym.exists) tsym.setFlag(TypeParam) |