]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Improve semantic check of simple type structs
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 15 Apr 2021 14:49:14 +0000 (16:49 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 15 Apr 2021 14:49:14 +0000 (16:49 +0200)
vala/valastruct.vala
vala/valavaluetype.vala

index 120a7b086f7103387a190ee4eb099902794111da..4c4e28fdc7370131f564d555e784e03762034ce2 100644 (file)
@@ -560,6 +560,9 @@ public class Vala.Struct : TypeSymbol {
                        }
                }
 
+               // FIXME Perform this [SimpleType] check in a better way
+               is_disposable ();
+
                if (!external && !external_package) {
                        bool has_instance_field = false;
                        foreach (Field f in fields) {
index aa97f7c3973a859d9d80bba30ecd3a0ad4d3b170..699046fb4b5e9f737242971ed158fa7d3bddae1b 100644 (file)
@@ -41,7 +41,7 @@ public abstract class Vala.ValueType : DataType {
                }
 
                unowned Struct? st = type_symbol as Struct;
-               if (st != null) {
+               if (st != null && !st.error) {
                        return st.is_disposable ();
                }