diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-01-16 17:11:14 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-01-17 13:11:08 +0100 |
commit | 6e7be51cb5455e9c5c721d4ba5121a6ab04673dd (patch) | |
tree | 5ffbed98ce6ab8a0e1e501a763a34ae3a84bdaf3 /vala/valaunaryexpression.vala | |
parent | f78932e3dbcdba5660800b816e7dc8752771f0d5 (diff) | |
download | vala-6e7be51cb5455e9c5c721d4ba5121a6ab04673dd.tar.gz |
vala: Don't allow assigning GtkChild fields/properties
These are handled exclusively by GtkBuilder
See https://gitlab.gnome.org/GNOME/vala/issues/1121
Diffstat (limited to 'vala/valaunaryexpression.vala')
-rw-r--r-- | vala/valaunaryexpression.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vala/valaunaryexpression.vala b/vala/valaunaryexpression.vala index 76c31cd7a..4bf6d4bc4 100644 --- a/vala/valaunaryexpression.vala +++ b/vala/valaunaryexpression.vala @@ -229,6 +229,11 @@ public class Vala.UnaryExpression : Expression { Report.error (source_reference, "ref and out method arguments can only be used with fields, parameters, local variables, and array element access"); return false; } + if (inner.symbol_reference.get_attribute ("GtkChild") != null) { + error = true; + Report.error (source_reference, "Assignment of [GtkChild] `%s' is not allowed", inner.symbol_reference.get_full_name ()); + return false; + } break; default: error = true; |