aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-10 10:03:33 +0200
committerLars Knoll <lars.knoll@qt.io>2018-04-25 17:50:01 +0000
commit9814c60536128396177b94104c93411e5065300c (patch)
treee1ef53dd3c1cad7f9b8cb6bd21d11fddc2486563
parentde3714c97d5edb016d37626ee5793b31ddd436fb (diff)
Don't do a forced lookup by name
Use referenceForName() consistently to do the lookup of a symbol. Otherwise we might get errors if the name refers to a local name that we do not export from the current scope Change-Id: I09e5816260cec8107411a8562e7f7b76f36912bf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 1aceb0f619..01ca3a6a5e 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -2242,7 +2242,7 @@ bool Codegen::visit(FunctionDeclaration * ast)
RegisterScope scope(this);
if (_context->compilationMode == QmlBinding)
- Reference::fromName(this, ast->name.toString()).loadInAccumulator();
+ referenceForName(ast->name.toString(), true).loadInAccumulator();
_expr.accept(nx);
return false;
}