From 379fd874eb9620a9df74bd395cea32698e94acc9 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 24 Feb 2015 22:41:37 +0100 Subject: 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. --- src/dotty/tools/dotc/core/pickling/UnPickler.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools') 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) -- cgit v1.2.3