Skip to content

Commit d1e5d40

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 9125f58 commit d1e5d40

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
@@ -963,7 +963,7 @@ class RefChecks extends MiniPhase { thisPhase =>
963963
checkAllOverrides(cls)
964964
tree
965965
} catch {
966-
case ex: MergeError =>
966+
case ex: TypeError =>
967967
ctx.error(ex.getMessage, tree.pos)
968968
tree
969969
}

0 commit comments

Comments
 (0)