From 2755657a7a9bd088086888d7ece22c5121e0c2f4 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 11 Oct 2018 11:21:11 +0200 Subject: JS: Check expressions inside template literals for validity And not use (a possibly invalid result) blindly, because this will cause assertion failures down the line. Task-number: QTBUG-71081 Change-Id: Id10149c55026094a355bd747f66014119c0e24f5 Reviewed-by: Simon Hausmann --- tests/auto/qml/v4misc/tst_v4misc.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/auto/qml/v4misc') diff --git a/tests/auto/qml/v4misc/tst_v4misc.cpp b/tests/auto/qml/v4misc/tst_v4misc.cpp index 21a826850b..a080826e15 100644 --- a/tests/auto/qml/v4misc/tst_v4misc.cpp +++ b/tests/auto/qml/v4misc/tst_v4misc.cpp @@ -110,6 +110,7 @@ void tst_v4misc::parserMisc_data() QTest::addColumn("error"); 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"); } void tst_v4misc::parserMisc() -- cgit v1.2.3