diff options
author | Lars Knoll <[email protected]> | 2018-05-07 15:34:58 +0200 |
---|---|---|
committer | Lars Knoll <[email protected]> | 2018-05-09 20:47:42 +0000 |
commit | 2fc50421c86134b5b42a4ba68aa7f6b87cfd7d74 (patch) | |
tree | dd6ddf7f16a058af35fe61ac6e77fad9c6460613 | |
parent | 01883b6910a6c85e7061b2936aa890da544b1060 (diff) |
Don't cast an ExpressionNode to a Statement
Change-Id: Ieb30d5345e56d6a2bb70320bf76eabcb9457e0f3
Reviewed-by: Simon Hausmann <[email protected]>
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 3543ddb177..837649a7dc 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -358,10 +358,10 @@ void Codegen::statementList(StatementList *ast) it->next->statement->kind == Statement::Kind_ContinueStatement || it->next->statement->kind == Statement::Kind_ReturnStatement) requiresReturnValue = _requiresReturnValue; - if (FunctionDeclaration *decl = cast<FunctionDeclaration *>(it->statement)) - statement(decl); + if (Statement *s = it->statement->statementCast()) + statement(s); else - statement(static_cast<Statement *>(it->statement)); + statement(static_cast<ExpressionNode *>(it->statement)); requiresReturnValue = false; if (it->statement->kind == Statement::Kind_ThrowStatement || it->statement->kind == Statement::Kind_BreakStatement || |