Skip to content

Commit 083c776

Browse files
committed
propagate
1 parent c998f47 commit 083c776

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,8 @@ object Symbols extends SymUtils {
334334
this.moduleClass.sourceSymbol // The module val always has a zero-extent position
335335
else if denot.is(ExportedType) then
336336
val tp = denot.info.dropAlias
337-
assert(tp.isInstanceOf[NamedType], i"denot=$denot info=${denot.info} tp=$tp ${tp.toString}")
337+
assert(tp.isInstanceOf[NamedType],
338+
i"denot=$denot info=${denot.info} tp=$tp ${tp.toString}")
338339
tp.asInstanceOf[NamedType].symbol.sourceSymbol
339340
else if (denot.is(Synthetic)) {
340341
val linked = denot.linkedClass

compiler/src/dotty/tools/dotc/interactive/Completion.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,11 @@ object Completion:
499499
completionsFilter(NoType, nameInScope) &&
500500
!sym.isAbsent() &&
501501
!sym.isPrimaryConstructor &&
502-
sym.sourceSymbol.exists &&
502+
{
503+
try sym.sourceSymbol.exists
504+
catch case ex: AssertionError =>
505+
throw new AssertionError(i"denot=$denot", ex)
506+
} &&
503507
(!sym.is(Package) || sym.is(ModuleClass)) &&
504508
!sym.isAllOf(Mutable | Accessor) &&
505509
!sym.isPackageObject &&

0 commit comments

Comments
 (0)