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 17fe03a commit c3bb79dCopy full SHA for c3bb79d
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -2251,7 +2251,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
2251
* tree that went unreported. A scenario where this happens is i1802.scala.
2252
*/
2253
def ensureReported(tp: Type) = tp match {
2254
- case err: ErrorType if !ctx.reporter.hasErrors => ctx.error(err.msg, tree.pos)
+ case err: ErrorType if !ctx.reporter.errorsReported => ctx.error(err.msg, tree.pos)
2255
case _ =>
2256
}
2257
tests/neg/ensureReported.scala
@@ -0,0 +1,6 @@
1
+object AnonymousF {
2
+ val f = {
3
+ case l @ List(1) => // error: missing parameter type // error: Ambiguous overload
4
+ Some(l)
5
+ }
6
+}
0 commit comments