[vala] Fix relational operations involving nullable types



commit d4e96870ebf6ba5a639f3c05e3e5212d363f3521
Author: Jürg Billeter <j bitron ch>
Date:   Fri Jan 29 18:35:32 2010 +0100

    Fix relational operations involving nullable types
    
    Fixes bug 600652.

 vala/valabinaryexpression.vala |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/vala/valabinaryexpression.vala b/vala/valabinaryexpression.vala
index 53dda1c..4400f02 100644
--- a/vala/valabinaryexpression.vala
+++ b/vala/valabinaryexpression.vala
@@ -1,6 +1,6 @@
 /* valabinaryexpression.vala
  *
- * Copyright (C) 2006-2009  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
@@ -309,6 +309,13 @@ public class Vala.BinaryExpression : Expression {
 					Report.error (source_reference, "Relational operation not supported for types `%s' and `%s'".printf (left.value_type.to_string (), right.value_type.to_string ()));
 					return false;
 				}
+
+				left.target_type = left.value_type.copy ();
+				left.target_type.nullable = false;
+				left.target_type.value_owned = false;
+				right.target_type = right.value_type.copy ();
+				right.target_type.nullable = false;
+				right.target_type.value_owned = false;
 			}
 
 			value_type = analyzer.bool_type;



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