diff options
Diffstat (limited to 'tests/objects/bug779955.vala')
-rw-r--r-- | tests/objects/bug779955.vala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/objects/bug779955.vala b/tests/objects/bug779955.vala new file mode 100644 index 000000000..e67ef0ca8 --- /dev/null +++ b/tests/objects/bug779955.vala @@ -0,0 +1,20 @@ +public class Foo : Object { + int i = 42; + + public int bar { + get { + return i; + } + set { + if (value == 42) { + i = 23; + } + } + } +} + +void main () { + var f = new Foo (); + f.bar = 42; + assert (f.bar == 23); +} |