diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-03-26 22:59:28 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-02 14:17:46 +0000 |
commit | 20d30b6b3a253eebedc927dbb91685bbec52cfee (patch) | |
tree | 0e91a6c519829bd279258f3fe807519e6c8a1e3d /src/qml/compiler/qqmlirbuilder.cpp | |
parent | d499a995292629d3522f5e77b7c958bacdf5d0ae (diff) |
Add support for proper lexical scoping
This is still to some extend work in progress as
lexically scoped for loops won't yet do the right
thing.
let and const variables are still accessible before
they are declared, and the global scope doesn't yet
have a proper context for lexically declared variables.
Change-Id: Ie39f74a8fccdaead437fbf07f9fc228a444c26ed
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r-- | src/qml/compiler/qqmlirbuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp index badf89fe44..c4b5859b58 100644 --- a/src/qml/compiler/qqmlirbuilder.cpp +++ b/src/qml/compiler/qqmlirbuilder.cpp @@ -2199,7 +2199,7 @@ QV4::Compiler::Codegen::Reference JSCodeGen::fallbackNameLookup(const QString &n // Look for IDs first. for (const IdMapping &mapping : qAsConst(_idObjects)) { if (name == mapping.name) { - if (_context->type == QV4::Compiler::ContextType::Binding) + if (_context->contextType == QV4::Compiler::ContextType::Binding) _context->idObjectDependencies.insert(mapping.idIndex); Instruction::LoadIdObject load; |