diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-02-10 23:22:13 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-04-25 17:49:38 +0000 |
commit | da5fffbd34d8be68f8ee4c649881dbb673c9c0a5 (patch) | |
tree | 2c4647732d8754f0c9b8573875cb5936639320ca /src/qml/compiler/qv4compilercontext_p.h | |
parent | e91d0091e0778ad1379f40d97daa704515bec3d4 (diff) |
Partially support binding patterns
Destructuring objects works, but arrays are not
yet supported.
Change-Id: I61e917e1964e3c719f71b8f11d194e09dfe288c2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilercontext_p.h')
-rw-r--r-- | src/qml/compiler/qv4compilercontext_p.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4compilercontext_p.h b/src/qml/compiler/qv4compilercontext_p.h index 455a76c729..fef2b56055 100644 --- a/src/qml/compiler/qv4compilercontext_p.h +++ b/src/qml/compiler/qv4compilercontext_p.h @@ -263,9 +263,8 @@ struct Context { return true; if (type != FunctionDefinition) { - for (QQmlJS::AST::FormalParameterList *it = formals; it; it = it->next) - if (it->name == name) - return (scope == QQmlJS::AST::VariableDeclaration::FunctionScope); + if (formals->containsName(name)) + return (scope == QQmlJS::AST::VariableDeclaration::FunctionScope); } MemberMap::iterator it = members.find(name); if (it != members.end()) { |