aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-05-31 16:21:28 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-05-31 16:30:09 +0200
commit51696d5e8dbd17fe2bfdfc669bbf22e0e50af6c6 (patch)
treef2439670f4292cab6fd3eb37496d0acb616d8a33 /tests
parentaefbf418b6d99f87f7bcc7df1eb530c278a17ab4 (diff)
Parser: Accept templated readonly properties
Change-Id: I37d313e3156a44eb4487b1be007aa93ace18d882 Fixes: QTBUG-76018 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlparser/tst_qqmlparser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp
index 71dd900073..89e1997096 100644
--- a/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp
+++ b/tests/auto/qml/qqmlparser/tst_qqmlparser.cpp
@@ -54,6 +54,7 @@ private slots:
void noSubstitutionTemplateLiteral();
void templateLiteral();
void leadingSemicolonInClass();
+ void templatedReadonlyProperty();
private:
QStringList excludedDirs;
@@ -289,6 +290,15 @@ void tst_qqmlparser::leadingSemicolonInClass()
QVERIFY(parser.parseProgram());
}
+void tst_qqmlparser::templatedReadonlyProperty()
+{
+ QQmlJS::Engine engine;
+ QQmlJS::Lexer lexer(&engine);
+ lexer.setCode(QLatin1String("A { readonly property list<B> listfoo: [ C{} ] }"), 1);
+ QQmlJS::Parser parser(&engine);
+ QVERIFY(parser.parse());
+}
+
QTEST_MAIN(tst_qqmlparser)
#include "tst_qqmlparser.moc"