Skip to content

Commit d0a2c74

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 1451448 commit d0a2c74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ class RefChecks extends MiniPhase { thisPhase =>
958958
checkAllOverrides(cls)
959959
tree
960960
} catch {
961-
case ex: MergeError =>
961+
case ex: TypeError =>
962962
ctx.error(ex.getMessage, tree.pos)
963963
tree
964964
}

0 commit comments

Comments
 (0)