aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/shared
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2020-05-13 15:31:51 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2020-05-20 13:46:36 +0200
commit1c0c8509da2a27858f7b25ffa71d1b19690c708c (patch)
treef574288f0275755a5691697267e58044322753bf /tests/auto/shared
parentdcc65ddf83fc4ccf1127dfc002c7951d6288e0d5 (diff)
Fix 'as' binary operation using invalid types
Fixes: QTBUG-81392 Change-Id: Ic83091c547a7854b7fa86b44d93c575bd7426bae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/shared')
-rw-r--r--tests/auto/shared/qqmljsastdumper.cpp6
-rw-r--r--tests/auto/shared/qqmljsastdumper.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/shared/qqmljsastdumper.cpp b/tests/auto/shared/qqmljsastdumper.cpp
index 1292be8d5b..34c31a294c 100644
--- a/tests/auto/shared/qqmljsastdumper.cpp
+++ b/tests/auto/shared/qqmljsastdumper.cpp
@@ -421,6 +421,12 @@ void AstDumper::endVisit(UiAnnotation *) { stop("UiAnnotation"); }
void AstDumper::endVisit(UiAnnotationList *) { stop("UiAnnotationList"); }
// QQmlJS
+bool AstDumper::visit(AST::TypeExpression *el) {
+ start("TypeExpression");
+ return true;
+}
+void AstDumper::endVisit(AST::TypeExpression *) { stop("TypeExpression"); }
+
bool AstDumper::visit(AST::ThisExpression *el) {
start(QLatin1String("ThisExpression thisToken=%1")
.arg(loc(el->thisToken)));
diff --git a/tests/auto/shared/qqmljsastdumper.h b/tests/auto/shared/qqmljsastdumper.h
index 5e46e516f0..4abaea7fba 100644
--- a/tests/auto/shared/qqmljsastdumper.h
+++ b/tests/auto/shared/qqmljsastdumper.h
@@ -146,6 +146,9 @@ public:
void endVisit(AST::UiAnnotationList *) override;
// QQmlJS
+ bool visit(AST::TypeExpression *) override;
+ void endVisit(AST::TypeExpression *) override;
+
bool visit(AST::ThisExpression *) override;
void endVisit(AST::ThisExpression *) override;