vala r1210 - in trunk: . vala



Author: juergbi
Date: Sun Apr 13 19:24:20 2008
New Revision: 1210
URL: http://svn.gnome.org/viewvc/vala?rev=1210&view=rev

Log:
2008-04-13  Juerg Billeter  <j bitron ch>

	* vala/valasemanticanalyzer.vala, vala/valasymbolresolver.vala:
	  fix issues when using non-null types


Modified:
   trunk/ChangeLog
   trunk/vala/valasemanticanalyzer.vala
   trunk/vala/valasymbolresolver.vala

Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala	(original)
+++ trunk/vala/valasemanticanalyzer.vala	Sun Apr 13 19:24:20 2008
@@ -1059,12 +1059,12 @@
 			var array_type = (ArrayType) collection_type;
 			element_data_type = array_type.element_type;
 			need_type_check = true;
-		} else if (collection_type.compatible (glist_type) || collection_type.compatible (gslist_type)) {		
+		} else if (collection_type.compatible (glist_type, false) || collection_type.compatible (gslist_type, false)) {		
 			if (collection_type.get_type_arguments ().size > 0) {
 				element_data_type = (DataType) collection_type.get_type_arguments ().get (0);
 				need_type_check = true;
 			}
-		} else if (iterable_type != null && collection_type.compatible (iterable_type)) {
+		} else if (iterable_type != null && collection_type.compatible (iterable_type, false)) {
 			stmt.iterator_variable_declarator = new VariableDeclarator ("%s_it".printf (stmt.variable_name));
 			stmt.iterator_variable_declarator.type_reference = new InterfaceType (iterator_type);
 			stmt.iterator_variable_declarator.type_reference.takes_ownership = true;

Modified: trunk/vala/valasymbolresolver.vala
==============================================================================
--- trunk/vala/valasymbolresolver.vala	(original)
+++ trunk/vala/valasymbolresolver.vala	Sun Apr 13 19:24:20 2008
@@ -305,6 +305,8 @@
 			element_type.transfers_ownership = false;
 			element_type.is_ref = false;
 			element_type.is_out = false;
+			element_type.nullable = false;
+			element_type.requires_null_check = false;
 
 			type = new ArrayType (element_type, unresolved_type.array_rank, unresolved_type.source_reference);
 			type.add_type_argument (element_type);



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