repo.or.cz
/
vala-lang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libgda-4.0, gedit-2.20: Fix gedit typo and GdaXaTransactionId.data
[vala-lang.git]
/
tests
/
control-flow
/
sideeffects.vala
blob
56028a5320b151ff4e1127b573248c00219a6f84
1
class
Maman
.
Foo
:
Object
{
2
public
int
i
=
1
;
3
4
public weak
Foo
sideeffect
() {
5
--
i
;
6
return
this
;
7
}
8
public
string
data
;
9
}
10
11
class
Maman
.
Bar
:
Object
{
12
public static
int
main
() {
13
var
foo
=
new
Foo
();
14
foo
.
sideeffect
().
data
=
"foo"
;
15
assert
(
foo
.
i
==
0
);
16
return
0
;
17
}
18
}
19
20
void
main
() {
21
Maman
.
Bar
.
main
();
22
}