From: Rico Tzschichholz Date: Fri, 15 Oct 2021 10:02:21 +0000 (+0200) Subject: vala: More thorough check of ValueType and set CodeNode.error on failure X-Git-Tag: 0.55.1~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba0d8e95c28f299170766c98ec4d8bf451da92d1;p=thirdparty%2Fvala.git vala: More thorough check of ValueType and set CodeNode.error on failure --- diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala index 861a32806..304da9eb2 100644 --- a/vala/valadelegatetype.vala +++ b/vala/valadelegatetype.vala @@ -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; } diff --git a/vala/valaobjecttype.vala b/vala/valaobjecttype.vala index 89a8bfe3f..2de10d5a6 100644 --- a/vala/valaobjecttype.vala +++ b/vala/valaobjecttype.vala @@ -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; } diff --git a/vala/valavaluetype.vala b/vala/valavaluetype.vala index bc1220e75..7ba034b3f 100644 --- a/vala/valavaluetype.vala +++ b/vala/valavaluetype.vala @@ -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; } }