Skip to content

Commit ceaecda

Browse files
oderskyBlaisorblade
authored andcommitted
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 d95554b commit ceaecda

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
@@ -960,7 +960,7 @@ class RefChecks extends MiniPhase { thisPhase =>
960960
checkAllOverrides(cls)
961961
tree
962962
} catch {
963-
case ex: MergeError =>
963+
case ex: TypeError =>
964964
ctx.error(ex.getMessage, tree.pos)
965965
tree
966966
}

0 commit comments

Comments
 (0)