[vala] girparser: Fix adding error types to functions



commit 6866309a3219f421a88887f168c0dd498b3c24e2
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu May 19 22:56:05 2011 +0200

    girparser: Fix adding error types to functions
    
    Fixes a regression of commit 0d5af7406b390f937acc1 accidentally
    missing the check on throws_string.

 vala/valagirparser.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 47c7c0a..87d1dc4 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -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));
 			}
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]