summaryrefslogtreecommitdiff
path: root/Examples/test-suite/octave/smart_pointer_multi_runme.m
blob: 71ef9109a62fe6b6373cb3f7db9b8d2bc4a9d7fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
smart_pointer_multi

f = Foo();
b = Bar(f);
s = Spam(b);
g = Grok(b);

s.x = 3;
if (s.getx() != 3)
    error
endif

g.x = 4;
if (g.getx() != 4)
    error
endif