qtdeclarative/tests/auto/qml/qmlcppcodegen/data/disappearingArrowFunction.qml

29 lines
505 B
QML
Raw Permalink Normal View History

pragma Strict
import QtQml
QtObject {
property Person inner: Person {
function getName() : int { return 5 }
}
property Person none: Person {}
property Person evil: Person {
property string getName: "not a function"
}
onObjectNameChanged: console.log(inner.getName())
function swapNone() {
let t = inner;
inner = none;
none = t;
}
function swapEvil() {
let t = inner;
inner = evil;
evil = t;
}
}