diff options
Diffstat (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp')
-rw-r--r-- | src/qml/compiler/qv4compilerscanfunctions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp index e520ccc002..c7e8b50e2b 100644 --- a/src/qml/compiler/qv4compilerscanfunctions.cpp +++ b/src/qml/compiler/qv4compilerscanfunctions.cpp @@ -655,7 +655,8 @@ bool ScanFunctions::enterFunction( outerContext->hasNestedFunctions = true; // The identifier of a function expression cannot be referenced from the enclosing environment. if (nameContext == FunctionNameContext::Outer) { - if (!outerContext->addLocalVar(name, Context::FunctionDefinition, VariableScope::Var, expr)) { + if (!outerContext->addLocalVar(name, Context::FunctionDefinition, VariableScope::Var, + expr, expr->identifierToken)) { _cg->throwSyntaxError(ast->firstSourceLocation(), QStringLiteral("Identifier %1 has already been declared").arg(name)); return false; } |