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
codegen: Add destroy_local, destroy_parameter, and destroy_field
[vala-lang.git]
/
tests
/
errors
/
bug567181.vala
blob
3700d78e4d2ea96fca095e866aa9a93522004d5b
1
GLib
.
List
<
Foo
>
list
;
2
3
errordomain Error
{
4
FOOBAR
,
5
}
6
7
class
Foo
:
Object
{
8
public
Foo
()
throws Error
{
9
list
.
append
(
this
);
10
throw
new Error
.
FOOBAR
(
"foo"
);
11
}
12
}
13
14
void
main
() {
15
Foo foo
=
null
;
16
list
=
new List
<
Foo
> ();
17
try
{
18
foo
=
new
Foo
();
19
}
catch
(
Error err
) {
20
}
21
assert
(
foo
==
null
);
22
/* There should be only 1 ref in the list */
23
assert
(
list
.
nth_data
(
0
).
ref_count
==
1
);
24
}