diff options
Diffstat (limited to 'tests/control-flow/bug736774.vala')
-rw-r--r-- | tests/control-flow/bug736774.vala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/control-flow/bug736774.vala b/tests/control-flow/bug736774.vala new file mode 100644 index 000000000..34064bd00 --- /dev/null +++ b/tests/control-flow/bug736774.vala @@ -0,0 +1,23 @@ +bool destroyed = false; + +class Foo : Object { + ~Foo() { + destroyed = true; + } +} + +Foo may_fail () throws Error { + return new Foo (); +} + +void func (Foo x) { +} + +void main() { + try { + func (may_fail ()); + } catch { + } + + assert (destroyed); +} |