summaryrefslogtreecommitdiff
path: root/tests/errors/bug778224.vala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors/bug778224.vala')
-rw-r--r--tests/errors/bug778224.vala26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/errors/bug778224.vala b/tests/errors/bug778224.vala
new file mode 100644
index 000000000..3a61a029b
--- /dev/null
+++ b/tests/errors/bug778224.vala
@@ -0,0 +1,26 @@
+errordomain FooError {
+ BAR;
+}
+
+[SimpleType]
+struct Foo {
+ int i;
+}
+
+bool @true = true;
+
+Foo foo () throws FooError {
+ if (@true) {
+ throw new FooError.BAR ("");
+ }
+
+ return { 1 };
+}
+
+void main () {
+ try {
+ foo ();
+ } catch {
+ }
+}
+