We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9961e70 commit 8f4210eCopy full SHA for 8f4210e
compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -1962,7 +1962,9 @@ trait Applications extends Compatibility {
1962
1963
def widenPrefix(alt: TermRef): Type = alt.prefix.widen match
1964
case pre: (TypeRef | ThisType) if pre.typeSymbol.is(Module) =>
1965
- pre.parents.reduceLeft(TypeComparer.andType(_, _))
+ val ps = pre.parents
1966
+ if ps.isEmpty then pre
1967
+ else ps.reduceLeft(TypeComparer.andType(_, _))
1968
case wpre => wpre
1969
1970
/** If two alternatives have the same symbol, we pick the one with the most
0 commit comments