Skip to content

Commit 379fd87

Browse files
committed
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.
1 parent 37947a0 commit 379fd87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/dotc/core/pickling/UnPickler.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ object UnPickler {
106106
case TempPolyType(tps, cinfo) => (tps, cinfo)
107107
case cinfo => (Nil, cinfo)
108108
}
109-
val parentRefs = ctx.normalizeToClassRefs(parents, cls, decls)
109+
var parentRefs = ctx.normalizeToClassRefs(parents, cls, decls)
110+
if (parentRefs.isEmpty) parentRefs = defn.ObjectClass.typeRef :: Nil
110111
for (tparam <- tparams) {
111112
val tsym = decls.lookup(tparam.name)
112113
if (tsym.exists) tsym.setFlag(TypeParam)

0 commit comments

Comments
 (0)