]> 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 07:48:12 +0000 (09:48 +0200)
vala/valadelegatetype.vala
vala/valaobjecttype.vala
vala/valavaluetype.vala

index 9821a9e70b08d7f10a1854bb285b8603d293fbe7..9d831954a13f63d19d35c652ddc5e95e938d438e 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 aa97f7c3973a859d9d80bba30ecd3a0ad4d3b170..a9a6b7fd00b9cfbd0ccfe6178723cf260d6e97a0 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;
        }
 }