aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsfunctioninitializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler/qqmljsfunctioninitializer.cpp')
-rw-r--r--src/qmlcompiler/qqmljsfunctioninitializer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qmlcompiler/qqmljsfunctioninitializer.cpp b/src/qmlcompiler/qqmljsfunctioninitializer.cpp
index 7898b25c59..4687c6bc0b 100644
--- a/src/qmlcompiler/qqmljsfunctioninitializer.cpp
+++ b/src/qmlcompiler/qqmljsfunctioninitializer.cpp
@@ -92,14 +92,15 @@ void QQmlJSFunctionInitializer::populateSignature(
for (const QQmlJS::AST::BoundName &argument : qAsConst(arguments)) {
if (argument.typeAnnotation) {
if (const auto type = m_typeResolver->typeFromAST(argument.typeAnnotation->type)) {
- function->argumentTypes.append(type);
+ function->argumentTypes.append(m_typeResolver->tracked(type));
} else {
- function->argumentTypes.append(m_typeResolver->varType());
+ function->argumentTypes.append(
+ m_typeResolver->tracked(m_typeResolver->varType()));
signatureError(u"Cannot resolve the argument type %1."_qs
.arg(argument.typeAnnotation->type->toString()));
}
} else {
- function->argumentTypes.append(m_typeResolver->varType());
+ function->argumentTypes.append(m_typeResolver->tracked(m_typeResolver->varType()));
signatureError(u"Functions without type annotations won't be compiled"_qs);
}
}