]> 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>
Tue, 19 Oct 2021 06:32:57 +0000 (08:32 +0200)
vala/valadelegatetype.vala
vala/valaobjecttype.vala
vala/valavaluetype.vala

index e23eb15a1f340856a18121959a0a5daa01da028c..d9c4b7a2e136d6eb5b96206d8ba8988a9dc1b578 100644 (file)
@@ -96,11 +96,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 8e08ade76b6c81e7b0a94884ff1d19916a9eaada..11047ed4a876fc14ce0021fafd5789d81e70d82b 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 699046fb4b5e9f737242971ed158fa7d3bddae1b..cf54919f1923fec5737a6ea56c574bfdfaea6d8b 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;
        }
 }