From cff4b04d4306e0192c914c2a6281992e2610109c Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Fri, 6 May 2016 11:10:46 -0700 Subject: Fix BreakSeeker for switch default targets. (#447) --- src/ast_utils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ast_utils.h') diff --git a/src/ast_utils.h b/src/ast_utils.h index ebb6861da..e09104cc6 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -36,6 +36,7 @@ struct BreakSeeker : public PostWalker> { for (auto name : curr->targets) { if (name == target) found++; } + if (curr->default_ == target) found++; } static bool has(Expression* tree, Name target) { -- cgit v1.2.3