summaryrefslogtreecommitdiff
path: root/vala/valaproperty.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-01-16 17:11:14 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-01-17 13:11:08 +0100
commit6e7be51cb5455e9c5c721d4ba5121a6ab04673dd (patch)
tree5ffbed98ce6ab8a0e1e501a763a34ae3a84bdaf3 /vala/valaproperty.vala
parentf78932e3dbcdba5660800b816e7dc8752771f0d5 (diff)
downloadvala-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/valaproperty.vala')
-rw-r--r--vala/valaproperty.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala
index 2fc1b4d60..0a2e437d5 100644
--- a/vala/valaproperty.vala
+++ b/vala/valaproperty.vala
@@ -492,6 +492,9 @@ public class Vala.Property : Symbol, Lockable {
get_accessor.check (context);
}
if (set_accessor != null) {
+ if (get_attribute ("GtkChild") != null) {
+ Report.warning (set_accessor.source_reference, "[GtkChild] property `%s' is not allowed to have `set' accessor", get_full_name ());
+ }
set_accessor.check (context);
}