[vala] Convert conditions in if statements to bool if necessary



commit 61b2284b443e8c7a442abdabc937438dd6fea5de
Author: Jürg Billeter <j bitron ch>
Date:   Fri Jan 29 15:13:24 2010 +0100

    Convert conditions in if statements to bool if necessary
    
    Fixes part of bug 608434.

 vala/valaifstatement.vala |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaifstatement.vala b/vala/valaifstatement.vala
index b245f44..b7c5fa1 100644
--- a/vala/valaifstatement.vala
+++ b/vala/valaifstatement.vala
@@ -1,6 +1,6 @@
 /* valaifstatement.vala
  *
- * Copyright (C) 2006-2008  Jürg Billeter
+ * Copyright (C) 2006-2010  Jürg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -109,6 +109,8 @@ public class Vala.IfStatement : CodeNode, Statement {
 
 		checked = true;
 
+		condition.target_type = analyzer.bool_type.copy ();
+
 		condition.check (analyzer);
 
 		true_statement.check (analyzer);



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