diff options
| author | Olivier De Cannière <olivier.decanniere@qt.io> | 2025-04-14 16:09:55 +0200 |
|---|---|---|
| committer | Olivier De Cannière <olivier.decanniere@qt.io> | 2025-04-14 22:11:49 +0200 |
| commit | 4beea6bc83f315ec57fd07ea0c21767dc63127d6 (patch) | |
| tree | e92f1684fb75c4a96d1a95ca76187051e8fd63e3 /src/qml/compiler/qv4codegen.cpp | |
| parent | e1663b155069471db15e3b909dbeac92a4414756 (diff) | |
qv4codegen: Track the correct location for assign instructions
This fixes a qmllint warning about unqualified access in the wrong place
in the following unconventional but valid case:
Warning: .../Main.qml:5:9: Unqualified access [unqualified]
console.log(a = 1)
^^^^^^^
Warning: .../Main.qml:5:21: Unqualified access [unqualified]
console.log(a = 1)
^
Pick-to: 6.9 6.8 6.5
Change-Id: I8eaa43f520c394b094917fe37dc6115ec2f7af74
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
| -rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index bd98c9fe69..b57a21eab6 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1483,6 +1483,7 @@ bool Codegen::visit(BinaryExpression *ast) return false; } else if (ast->op == QSOperator::Assign) { + bytecodeGenerator->setLocation(ast->left->firstSourceLocation()); if (AST::Pattern *p = ast->left->patternCast()) { RegisterScope scope(this); Reference right = expression(ast->right); |
