Skip to content

Commit 992eed9

Browse files
committed
Don't swallow errors in requiredSymbol
1 parent 13c3210 commit 992eed9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,10 @@ object Denotations {
295295
(p: Symbol => Boolean)
296296
(using Context): Symbol =
297297
disambiguate(p) match {
298-
case m @ MissingRef(ownerd, name) =>
299-
if (generateStubs) {
300-
if (ctx.settings.YdebugMissingRefs.value) m.ex.printStackTrace()
301-
newStubSymbol(ownerd.symbol, name, source)
302-
}
303-
else NoSymbol
304-
case NoDenotation | _: NoQualifyingRef =>
298+
case m @ MissingRef(ownerd, name) if generateStubs =>
299+
if ctx.settings.YdebugMissingRefs.value then m.ex.printStackTrace()
300+
newStubSymbol(ownerd.symbol, name, source)
301+
case NoDenotation | _: NoQualifyingRef | _: MissingRef =>
305302
def argStr = if (args.isEmpty) "" else i" matching ($args%, %)"
306303
val msg =
307304
if (site.exists) i"$site does not have a member $kind $name$argStr"

0 commit comments

Comments
 (0)