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 f1d4e84 commit 10610cbCopy full SHA for 10610cb
src/dotty/tools/dotc/core/Symbols.scala
@@ -406,8 +406,12 @@ object Symbols {
406
}
407
408
/** Subclass tests and casts */
409
- final def isTerm(implicit ctx: Context): Boolean = lastDenot.isTerm
410
- final def isType(implicit ctx: Context): Boolean = lastDenot.isType
+ final def isTerm(implicit ctx: Context): Boolean =
+ (if(isDefinedInCurrentRun) lastDenot else denot).isTerm
411
+
412
+ final def isType(implicit ctx: Context): Boolean =
413
+ (if(isDefinedInCurrentRun) lastDenot else denot).isType
414
415
final def isClass: Boolean = isInstanceOf[ClassSymbol]
416
417
final def asTerm(implicit ctx: Context): TermSymbol = { assert(isTerm, s"asTerm called on not-a-Term $this" ); asInstanceOf[TermSymbol] }
0 commit comments