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