]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: More thorough check of ValueType and set CodeNode.error on failure
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 15 Oct 2021 10:02:21 +0000 (12:02 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 15 Oct 2021 10:22:54 +0000 (12:22 +0200)
vala/valadelegatetype.vala
vala/valaobjecttype.vala
vala/valavaluetype.vala

index 861a32806083af7d0f1ac671ffbb6a29b73555fe..304da9eb25bb1c4fbdaf6ce6ee6828d43e8451d5 100644 (file)
@@ -95,11 +95,13 @@ public class Vala.DelegateType : CallableType {
                }
 
                if (!delegate_symbol.check (context)) {
+                       error = true;
                        return false;
                }
 
                // check whether there is the expected amount of type-arguments
                if (!check_type_arguments (context, true)) {
+                       error = true;
                        return false;
                }
 
index 89a8bfe3fc71b2bd9f27e314dd4dfdb7bb93c509..2de10d5a6fff8483988490653e2fd549676f0e65 100644 (file)
@@ -100,11 +100,13 @@ public class Vala.ObjectType : ReferenceType {
 
        public override bool check (CodeContext context) {
                if (!type_symbol.check (context)) {
+                       error = true;
                        return false;
                }
 
                // check whether there is the expected amount of type-arguments
                if (!check_type_arguments (context, true)) {
+                       error = true;
                        return false;
                }
 
index bc1220e752d986d892f8bc71fa9e1b9f328fbffa..7ba034b3fe5252aabe671c4c826c67b018c05385 100644 (file)
@@ -49,6 +49,17 @@ public abstract class Vala.ValueType : DataType {
        }
 
        public override bool check (CodeContext context) {
-               return type_symbol.check (context);
+               if (!type_symbol.check (context)) {
+                       error = true;
+                       return false;
+               }
+
+               // check whether there is the expected amount of type-arguments
+               if (!check_type_arguments (context, true)) {
+                       error = true;
+                       return false;
+               }
+
+               return true;
        }
 }