]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Fix adding error types to functions
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 19 May 2011 20:56:05 +0000 (22:56 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Thu, 19 May 2011 20:56:30 +0000 (22:56 +0200)
Fixes a regression of commit 0d5af7406b390f937acc1 accidentally
missing the check on throws_string.

vala/valagirparser.vala

index 47c7c0a1d8add719d9c6c97842bfa02fe25866dc..87d1dc4b4a092d4f56f604a21ab29f2b6097093b 100644 (file)
@@ -2432,7 +2432,7 @@ public class Vala.GirParser : CodeVisitor {
                                foreach (var error_type in error_types) {
                                        s.add_error_type (parse_type_from_string (error_type, true, metadata.get_source_reference (ArgumentType.THROWS)));
                                }
-                       } else {
+                       } else if (throws_string == "1") {
                                s.add_error_type (new ErrorType (null, null));
                        }
                }