vala r2315 - in trunk: . vala



Author: juergbi
Date: Fri Jan  9 23:07:48 2009
New Revision: 2315
URL: http://svn.gnome.org/viewvc/vala?rev=2315&view=rev

Log:
2009-01-10  JÃrg Billeter  <j bitron ch>

	* vala/valafield.vala:

	Report error when field type is less accessible than field


Modified:
   trunk/ChangeLog
   trunk/vala/valafield.vala

Modified: trunk/vala/valafield.vala
==============================================================================
--- trunk/vala/valafield.vala	(original)
+++ trunk/vala/valafield.vala	Fri Jan  9 23:07:48 2009
@@ -257,6 +257,13 @@
 
 		field_type.check (analyzer);
 
+		// check whether field type is at least as accessible as the field
+		if (!analyzer.is_type_accessible (this, field_type)) {
+			error = true;
+			Report.error (source_reference, "field type `%s` is less accessible than field `%s`".printf (field_type.to_string (), get_full_name ()));
+			return false;
+		}
+
 		process_attributes ();
 
 		if (initializer != null) {



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