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 716d72e commit bacf9a6Copy full SHA for bacf9a6
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -2125,7 +2125,12 @@ object Types {
2125
abstract case class ThisType(tref: TypeRef) extends CachedProxyType with SingletonType {
2126
def cls(implicit ctx: Context): ClassSymbol = tref.stableInRunSymbol.asClass
2127
override def underlying(implicit ctx: Context): Type =
2128
- if (ctx.erasedTypes) tref else cls.classInfo.selfType
+ if (ctx.erasedTypes) tref
2129
+ else cls.info match {
2130
+ case cinfo: ClassInfo => cinfo.selfType
2131
+ case cinfo: ErrorType if ctx.mode.is(Mode.Interactive) => cinfo
2132
+ // can happen in IDE if `cls` is stale
2133
+ }
2134
2135
override def computeHash = doHash(tref)
2136
0 commit comments