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 0e2dde6 commit d6c62ddCopy full SHA for d6c62dd
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -3512,12 +3512,13 @@ class Typer extends Namer
3512
try
3513
val nestedCtx = ctx.fresh.setNewTyperState()
3514
val app = tryExtension(using nestedCtx)
3515
- if !app.isEmpty then
+ if !app.isEmpty && !nestedCtx.reporter.hasErrors then
3516
+ nestedCtx.typerState.commit()
3517
+ return ExtMethodApply(app)
3518
+ else
3519
nestedCtx.reporter.allErrors
3520
.filterNot(_.msg.isInstanceOf[NotAnExtensionMethod]) match
3521
case Nil =>
- nestedCtx.typerState.commit()
- return ExtMethodApply(app)
3522
case err :: _ =>
3523
rememberSearchFailure(tree,
3524
SearchFailure(app.withType(FailedExtension(app, pt, err.msg))))
0 commit comments