vala r1584 - in trunk: . gobject
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1584 - in trunk: . gobject
- Date: Sun, 15 Jun 2008 19:50:00 +0000 (UTC)
Author: juergbi
Date: Sun Jun 15 19:50:00 2008
New Revision: 1584
URL: http://svn.gnome.org/viewvc/vala?rev=1584&view=rev
Log:
2008-06-15 JÃrg Billeter <j bitron ch>
* gobject/valaccodecreationmethodbinding.vala:
Report error when trying to assign private properties in creation
methods, patch by Hans Vercammen, fixes bug 536353
Modified:
trunk/ChangeLog
trunk/gobject/valaccodecreationmethodbinding.vala
Modified: trunk/gobject/valaccodecreationmethodbinding.vala
==============================================================================
--- trunk/gobject/valaccodecreationmethodbinding.vala (original)
+++ trunk/gobject/valaccodecreationmethodbinding.vala Sun Jun 15 19:50:00 2008
@@ -46,7 +46,14 @@
Report.error (stmt.source_reference, "class creation methods only allow property assignment statements");
return;
}
- if (((ExpressionStatement) stmt).assigned_property ().set_accessor.construction) {
+
+ Property prop = ((ExpressionStatement) stmt).assigned_property ();
+ if (prop.access == SymbolAccessibility.PRIVATE) {
+ m.error = true;
+ Report.error (stmt.source_reference, "class creation methods only allow assignments to public and protected properties");
+ return;
+ }
+ if (prop.set_accessor.construction) {
n_params++;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]