]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: NoAccessorMethod checks require GOBJECT profile
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 19 Jul 2019 17:56:32 +0000 (19:56 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 19 Jul 2019 18:04:48 +0000 (20:04 +0200)
This fixes criticals like
    vala_class_real_is_subtype_of: assertion 't != NULL' failed

Regression of a6441ec3c27e059d32501a4e09c937ac668f3ad9

vala/valapropertyaccessor.vala

index 5326ab64a90a38c90732a318d42cbd53960444df..d98aebc3a60e59174512d80999c45e1584f3aeb2 100644 (file)
@@ -158,7 +158,8 @@ public class Vala.PropertyAccessor : Subroutine {
                        value_parameter = new Parameter ("value", value_type, source_reference);
                }
 
-               if (readable && ((TypeSymbol) prop.parent_symbol).is_subtype_of (context.analyzer.object_type)) {
+               if (context.profile == Profile.GOBJECT
+                   && readable && ((TypeSymbol) prop.parent_symbol).is_subtype_of (context.analyzer.object_type)) {
                        //FIXME Code duplication with CCodeMemberAccessModule.visit_member_access()
                        if (prop.get_attribute ("NoAccessorMethod") != null) {
                                if (value_type.is_real_struct_type ()) {