vala r1171 - in trunk: . vala



Author: juergbi
Date: Mon Apr  7 15:08:31 2008
New Revision: 1171
URL: http://svn.gnome.org/viewvc/vala?rev=1171&view=rev

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

	* vala/valasemanticanalyzer.vala: check accessiblity of property
	  types, fixes bug 512404


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

Modified: trunk/vala/valasemanticanalyzer.vala
==============================================================================
--- trunk/vala/valasemanticanalyzer.vala	(original)
+++ trunk/vala/valasemanticanalyzer.vala	Mon Apr  7 15:08:31 2008
@@ -621,6 +621,13 @@
 
 		prop.accept_children (this);
 
+		// check whether property type is at least as accessible as the property
+		if (!is_type_accessible (prop, prop.type_reference)) {
+			prop.error = true;
+			Report.error (prop.source_reference, "property type `%s` is less accessible than property `%s`".printf (prop.type_reference.to_string (), prop.get_full_name ()));
+			return;
+		}
+
 		/* abstract/virtual properties using reference types without
 		 * reference counting need to transfer ownership of their
 		 * return values because of limitations in the GObject property



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