aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilerscanfunctions.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-12-02 13:56:20 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-12-16 12:09:24 +0100
commit925d60291b4e970f51c0fcfc47da72e376e89a44 (patch)
treee315aacf09aa3ad7e6f5a4c982638b1dfb5bf5af /src/qml/compiler/qv4compilerscanfunctions.cpp
parent2b7c811844a33410eed9a0572aab1e4b1802fb23 (diff)
QmlCompiler: Fix recognition of builtin list types
Previously all list types used as arguments or return types for methods had to be looked up via the imports. However, builtin types are not part of the imports at run time. Therefore, recognize list types already early on, when generating the IR. This is the same way we do it for property types and it allows us to easily identify lists of builtins. Fixes: QTBUG-109147 Change-Id: I91fa9c8fc99c1e0155cc5db5faddd928ca7fabbc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit c4fc1167188cde9e89d44a8e5e02c5b1e04c61a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp')
-rw-r--r--src/qml/compiler/qv4compilerscanfunctions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp
index 157d2896aa..380cf66f47 100644
--- a/src/qml/compiler/qv4compilerscanfunctions.cpp
+++ b/src/qml/compiler/qv4compilerscanfunctions.cpp
@@ -675,7 +675,7 @@ bool ScanFunctions::enterFunction(
_context->isGenerator = true;
if (expr->typeAnnotation)
- _context->returnType = expr->typeAnnotation->type->toString();
+ _context->returnType = expr->typeAnnotation->type;
}