diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-08-27 11:18:35 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-09-03 10:57:02 +0200 |
commit | 4ba86a97011dda2d8792ee23f0e86015715a592e (patch) | |
tree | 5f666078e7bb9c01d9c88db9446ffad364aebf71 /tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | |
parent | fcf0dfed9d9dbfa0fc1c91f334caf16926b8552c (diff) |
qqmljs.g: reduce number of conflicts
First, let the lexer create a T_FUNCTION_STAR token for "function *",
which makes the job of the parser significantly easier.
Then, by using GeneratorDeclaration instead of GeneratorExpression, we can
avoid the conflicts between UiObjectMember and PrimaryExpression
Change-Id: Ib08918e3977ed1a80cdea0948da80bf37886f7de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r-- | tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp index b44fe9766c..1decaeda7f 100644 --- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp +++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp @@ -6356,6 +6356,8 @@ void tst_qqmlecmascript::topLevelGeneratorFunction() QQmlComponent component(&engine, testFileUrl("generatorFunction.qml")); QScopedPointer<QObject> o {component.create()}; + if (!o) + qDebug() << component.errorString(); QVERIFY(o != nullptr); // check that generator works correctly in QML |