diff options
Diffstat (limited to 'src/qml/parser/qqmljsast.cpp')
-rw-r--r-- | src/qml/parser/qqmljsast.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/qml/parser/qqmljsast.cpp b/src/qml/parser/qqmljsast.cpp index e3ed876473..347a2945f3 100644 --- a/src/qml/parser/qqmljsast.cpp +++ b/src/qml/parser/qqmljsast.cpp @@ -3,6 +3,7 @@ #include <QString> #include <QLocale> +#include "common/qqmljssourcelocation_p.h" #include "qqmljsast_p.h" #include "qqmljsastvisitor_p.h" @@ -1015,13 +1016,9 @@ BoundNames FormalParameterList::formals() const // change the name of the earlier argument to enforce the lookup semantics from the spec formals[duplicateIndex].id += QLatin1String("#") + QString::number(i); } - formals += { - name, - it->element->typeAnnotation, - it->element->isInjectedSignalParameter - ? BoundName::Injected - : BoundName::Declared - }; + formals += { name, it->element->firstSourceLocation(), it->element->typeAnnotation, + it->element->isInjectedSignalParameter ? BoundName::Injected + : BoundName::Declared }; } ++i; } @@ -1423,8 +1420,8 @@ void PatternElement::boundNames(BoundNames *names) else if (PatternPropertyList *p = propertyList()) p->boundNames(names); } else { - names->append({bindingIdentifier.toString(), typeAnnotation, - isInjectedSignalParameter ? BoundName::Injected : BoundName::Declared}); + names->append({ bindingIdentifier.toString(), firstSourceLocation(), typeAnnotation, + isInjectedSignalParameter ? BoundName::Injected : BoundName::Declared }); } } |