Skip to content

Commit bb009bf

Browse files
committed
Another compensation for c64e676
TermRefs that do not have a symbol should not be widened under widenIfUnstable.
1 parent 15452c7 commit bb009bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ object Types {
10821082
/** Widen type if it is unstable (i.e. an ExprType, or TermRef to unstable symbol */
10831083
final def widenIfUnstable(implicit ctx: Context): Type = stripTypeVar match {
10841084
case tp: ExprType => tp.resultType.widenIfUnstable
1085-
case tp: TermRef if !tp.symbol.isStableMember => tp.underlying.widenIfUnstable
1085+
case tp: TermRef if tp.symbol.exists && !tp.symbol.isStableMember => tp.underlying.widenIfUnstable
10861086
case _ => this
10871087
}
10881088

0 commit comments

Comments
 (0)