aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/data/disappearingArrowFunction.qml
blob: cb97ab5c02756b64d1fe8bce4a6126e3f2000b00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
    }
}