ma.error = true;
Report.error (ma.source_reference, "Property `%s' is read-only".printf (prop.get_full_name ()));
return false;
+ } else if (!analyzer.context.deprecated
+ && !prop.set_accessor.writable
+ && analyzer.find_current_method () is CreationMethod) {
+ Report.warning (ma.source_reference, "assigning to construct-only properties is deprecated, use Object (property: value) constructor chain up");
}
} else if (ma.symbol_reference is LocalVariable && right.value_type == null) {
var local = (LocalVariable) ma.symbol_reference;
* Simple reader for a subset of XML.
*/
public class Vala.MarkupReader : Object {
- public string filename { get; construct; }
+ public string filename { get; private set; }
public string name { get; private set; }
this.context = context;
}
- public CodeContext context { get; construct; }
- public SourceFile gidl { get; construct; }
- public SourceFile metadata { get; construct; }
+ public CodeContext context { get; private set; }
+ public SourceFile gidl { get; private set; }
+ public SourceFile metadata { get; private set; }
private List<string> _scope;
private Set<string> _symbols;