summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-05-10 23:29:23 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-11 07:17:33 +0000
commitfb04917e8eb1f7cc5832b2f13ab1d208b0e1014f (patch)
tree9018734b467c7b049180b104e84fa586f9d1912f /src/qml/compiler/qv4codegen.cpp
parentfd183d3db9d1eba4f7dd3e978192a247bf7dba85 (diff)
downloadqtdeclarative-fb04917e8eb1f7cc5832b2f13ab1d208b0e1014f.tar.gz
Give case blocks a proper scope
Change-Id: Id307c0426e1c9326ac085cebda71934cb5e612e0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 687731c32b..9c63360107 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2827,6 +2827,8 @@ bool Codegen::visit(SwitchStatement *ast)
RegisterScope scope(this);
if (ast->block) {
+ ControlFlowBlock controlFlow(this, ast->block);
+
BytecodeGenerator::Label switchEnd = bytecodeGenerator->newLabel();
Reference lhs = expression(ast->expression);