diff --git a/compiler/src/dotty/tools/dotc/core/Symbols.scala b/compiler/src/dotty/tools/dotc/core/Symbols.scala index f6be9b08fd11..29d5c47703a2 100644 --- a/compiler/src/dotty/tools/dotc/core/Symbols.scala +++ b/compiler/src/dotty/tools/dotc/core/Symbols.scala @@ -333,7 +333,9 @@ object Symbols extends SymUtils { else if (denot.is(ModuleVal)) this.moduleClass.sourceSymbol // The module val always has a zero-extent position else if denot.is(ExportedType) then - denot.info.dropAlias.asInstanceOf[NamedType].symbol.sourceSymbol + val tp = denot.info.dropAlias + assert(tp.isInstanceOf[NamedType], i"denot=$denot info=${denot.info} tp=$tp ${tp.toString}") + tp.asInstanceOf[NamedType].symbol.sourceSymbol else if (denot.is(Synthetic)) { val linked = denot.linkedClass if (linked.exists && !linked.is(Synthetic))