diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-10-12 08:50:24 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-10-15 06:52:42 +0000 |
commit | 44eb850b2e0f27c3664b840fcc20c3b846e0818a (patch) | |
tree | 46141298f00578e0774bfb7bbae6a799a371ced4 /tests/auto/qml/v4misc | |
parent | f97e72d1da5961b5702f05653e42c9e853f75400 (diff) |
Abort parsing on error
The visit() methods need to return false on parse errors, so
that we don't continue iterating into that subtree of the AST,
but rather exit as quickly as possible.
Task-number: QTBUG-71090
Change-Id: I1912d955a0ffc86389a4cbbb3b6ac0209c3c556a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/v4misc')
-rw-r--r-- | tests/auto/qml/v4misc/tst_v4misc.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qml/v4misc/tst_v4misc.cpp b/tests/auto/qml/v4misc/tst_v4misc.cpp index a080826e15..e1796d18b4 100644 --- a/tests/auto/qml/v4misc/tst_v4misc.cpp +++ b/tests/auto/qml/v4misc/tst_v4misc.cpp @@ -111,6 +111,7 @@ void tst_v4misc::parserMisc_data() QTest::newRow("8[++i][+++i]") << QString("ReferenceError: Prefix ++ operator applied to value that is not a reference."); QTest::newRow("`a${1++}`") << QString("ReferenceError: Invalid left-hand side expression in postfix operation"); + QTest::newRow("for (var f in ++!binaryMathg) ;") << QString("ReferenceError: Prefix ++ operator applied to value that is not a reference."); } void tst_v4misc::parserMisc() |