Skip to content

Commit f7b08b6

Browse files
committed
Harden RefChecks
I had a TypeError crash in refchecks after screwing up a typeclass encoding in a particularly bad way. This commit reports an error instead.
1 parent f787d11 commit f7b08b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ class RefChecks extends MiniPhase { thisPhase =>
979979
checkAllOverrides(cls)
980980
tree
981981
} catch {
982-
case ex: MergeError =>
982+
case ex: TypeError =>
983983
ctx.error(ex.getMessage, tree.pos)
984984
tree
985985
}

0 commit comments

Comments
 (0)