diff options
Diffstat (limited to 'src/qmlcompiler/qqmljsfunctioninitializer.cpp')
| -rw-r--r-- | src/qmlcompiler/qqmljsfunctioninitializer.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/qmlcompiler/qqmljsfunctioninitializer.cpp b/src/qmlcompiler/qqmljsfunctioninitializer.cpp index 77f2894b91..c993197399 100644 --- a/src/qmlcompiler/qqmljsfunctioninitializer.cpp +++ b/src/qmlcompiler/qqmljsfunctioninitializer.cpp @@ -92,16 +92,20 @@ 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(m_typeResolver->trackedType(type)); + function->argumentTypes.append( + m_typeResolver->tracked( + m_typeResolver->globalType(type))); } else { function->argumentTypes.append( - m_typeResolver->trackedType(m_typeResolver->varType())); + m_typeResolver->tracked( + m_typeResolver->globalType(m_typeResolver->varType()))); signatureError(u"Cannot resolve the argument type %1."_qs .arg(argument.typeAnnotation->type->toString())); } } else { - function->argumentTypes.append(m_typeResolver->trackedType( - m_typeResolver->varType())); + function->argumentTypes.append( + m_typeResolver->tracked( + m_typeResolver->globalType(m_typeResolver->varType()))); signatureError(u"Functions without type annotations won't be compiled"_qs); } } |
