libgda-4.0, gedit-2.20: Fix gedit typo and GdaXaTransactionId.data
[vala-lang.git] / tests / control-flow / sideeffects.vala
blob56028a5320b151ff4e1127b573248c00219a6f84
1 class Maman.Foo : Object {
2 public int i = 1;
4 public weak Foo sideeffect () {
5 --i;
6 return this;
8 public string data;
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;
20 void main () {
21 Maman.Bar.main ();