Files
qt-creator/tests/auto/qml/codemodel/check/useless-blocks.qml
Christian Stenger 0980ef7e49 Tests: Adapt test after changing diagnostics
Blocks are no more considered bad per se. Only if they
contain a var statement they are considered as bad and
worth a warning.
Amends 2447d1d69c.

Change-Id: I93b5e43c01059b66f3fb287772e54f3ae3e157af
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-05-25 13:47:52 +00:00

35 lines
447 B
QML

import QtQuick 2.0
Rectangle {
function foo() {
{ // 115 9 9
var x = 10
}
{
let x = 10
}
if (a) {}
}
onXChanged: {
{ // 115 9 9
var y = 11
}
{
let y = 11
}
while (A) {}
}
property int d: {
{ // 115 9 9
var z = 12
}
{
let y = 12
}
}
}