Fix liveness analysis typo for break/continue

This commit is contained in:
Nigel Tao committed 2022-01-25 12:56:48 +11:00
1 parent d53f37997f
commit 54646d826d
1 file changed
+2 -2
+2 -2
View File
@@ -385,9 +385,9 @@ func (h *livenessHelper) doJump(r livenesses, n *a.Jump, depth uint32) error {
l := h.loops[n.JumpTarget()]
switch n.Keyword() {
case t.IDBreak:
l.changed = l.before.reconcile(r) || l.changed
case t.IDContinue:
l.changed = l.after.reconcile(r) || l.changed
case t.IDContinue:
l.changed = l.before.reconcile(r) || l.changed
default:
return fmt.Errorf("unrecognized ast.Jump keyword")
}