Files
qt-creator/tests/auto/qml/codemodel/check/case-fallthrough.qml
Christian Stenger 2944b33530 Tests: Fix codemodel check test
Change-Id: I9ca0fec928ac90fd5951fc54963ba5e96d5a53a6
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
2020-07-30 13:43:12 +00:00

45 lines
756 B
QML

import QtQuick 2.0
Item {
x: {
switch (a) { // 108 17 17
case 1:
case 2:
x = 1
// fallthrough
case 3:
break
case 4:
continue
case 5:
case 6:
default:
case 8:
return
case 10:
x = 1
break
case 9:
}
switch (a) { // 108 17 17
case 1:
case 2: // 20 9 12
x = 1
case 3:
break
case 4: // 20 9 12
function a() {
}
case 5:
case 6:
default:
case 8: // 20 9 12
x = 1
case 9:
case 11: // no warning
x = 1
}
}
}