Skip to content

Commit 4d32e4d

Browse files
committed
Handle parameters from base classes of package objects
Needed to compile i0239.scala correctly.
1 parent 9fde63d commit 4d32e4d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/src/dotty/tools/dotc/core/TypeOps.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
7373
throw new AssertionError(ex"$pre contains no matching argument for ${tparam.showLocated} ")
7474
case OrType(tp1, tp2) => argForParam(tp1, cls) | argForParam(tp2, cls)
7575
case AndType(tp1, tp2) => argForParam(tp1, cls) & argForParam(tp2, cls)
76-
case _ => tp
76+
case _ =>
77+
if (pre.termSymbol is Package) argForParam(pre.select(nme.PACKAGE), tparam)
78+
else throw new AssertionError(ex"$pre contains no matching argument for ${tparam.showLocated} ")
7779
}
7880
}
7981

0 commit comments

Comments
 (0)