diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-15 10:04:02 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-08-15 14:24:51 +0000 |
commit | ff91acdd152b3c6598d742a3ab11021360db5538 (patch) | |
tree | 675c4572929cec58d472abd0dac85af8749fba78 /src/qml/parser/qqmljsast_p.h | |
parent | 552ea3d320542af09a1983ec9a9fd9ba4324abc9 (diff) |
Fix usage of const in for declarations
We correctly produce a syntax error for a const declaration that is
without an initialize, such as
const x;
but we have to make an exception if it's part of a for declaration, such
as
for (const x of [1, 2, 3])
Change-Id: Iab86d73f2edc1f3deaf62f0f43f8b04789696b65
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/parser/qqmljsast_p.h')
-rw-r--r-- | src/qml/parser/qqmljsast_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/parser/qqmljsast_p.h b/src/qml/parser/qqmljsast_p.h index c74bf60a99..b69fb6272b 100644 --- a/src/qml/parser/qqmljsast_p.h +++ b/src/qml/parser/qqmljsast_p.h @@ -726,6 +726,7 @@ public: Type type = Literal; // when used in a VariableDeclarationList VariableScope scope = VariableScope::NoScope; + bool isForDeclaration = false; }; class QML_PARSER_EXPORT PatternElementList : public Node |