Skip to content

Commit 29c03b9

Browse files
committed
No report for error types
1 parent cfe8305 commit 29c03b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ trait Checking {
917917
enum Reason:
918918
case NonConforming, RefutableExtractor
919919

920-
def fail(pat: Tree, pt: Type, reason: Reason): Boolean = {
920+
def fail(pat: Tree, pt: Type, reason: Reason): Boolean = !pat.tpe.isErroneous && !pt.isErroneous && {
921921
import Reason.*
922922
val message = reason match
923923
case NonConforming =>

0 commit comments

Comments
 (0)