Commit 1aa344ca authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

report error when trying to set construct-only properties

2008-04-19  Juerg Billeter  <j@bitron.ch>

	* vala/valasemanticanalyzer.vala: report error when trying to set
	  construct-only properties

svn path=/trunk/; revision=1278
parent fa0e3251
2008-04-19 Jürg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: report error when trying to set
construct-only properties
2008-04-19 Jürg Billeter <j@bitron.ch>
* gobject/valaccodeassignmentbinding.vala: fix D-Bus signal
......
......@@ -3013,7 +3013,8 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
} else if (ma.symbol_reference is Property) {
var prop = (Property) ma.symbol_reference;
if (prop.set_accessor == null) {
if (prop.set_accessor == null
|| (!prop.set_accessor.writable && !(find_current_method () is CreationMethod))) {
ma.error = true;
Report.error (ma.source_reference, "Property `%s' is read-only".printf (prop.get_full_name ()));
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment