Files
qt-creator/tests/auto/qml/codemodel/check/case-fallthrough.qml
Christian Kamm d02b647bbf QmlJS checks: Don't warn for fallthrough on the last clause.
Change-Id: Ica84ced241eafd82cededa65d2e90f855e448f89
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-11-29 11:11:41 +01:00

45 lines
730 B
QML

import QtQuick 2.0
Item {
x: {
switch (a) {
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) {
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
}
}
}