Files
qt-creator/tests/auto/qml/codemodel/check/confusing-plus-minus.qml
Christian Kamm c82d53d4ae QmlJS checks: Add confusing +/- check.
Migrated from QtChecker.

Change-Id: I06115152f979f9abfa9cbdf4a3e2e63a51ea7284
Reviewed-on: http://codereview.qt-project.org/5858
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-10-10 14:39:56 +02:00

15 lines
305 B
QML

import QtQuick 1.0
Item {
function foo() {
var x, y
x = 1 + +2 // 117 15 17
x = 1 + ++x // 117 15 17
x = x++ + x // 117 15 17
x = 1 - -2 // 119 15 17
x = 1 - --x // 119 15 17
x = x-- - x // 119 15 17
x = x + --y + y-- + x++ - y
}
}