[vala/0.48] vala: More thorough check of ValueType and set CodeNode.error on failure
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] vala: More thorough check of ValueType and set CodeNode.error on failure
- Date: Tue, 19 Oct 2021 08:00:25 +0000 (UTC)
commit d64194b70171daccfcddc43e3a68e584b82d471a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Oct 15 12:02:21 2021 +0200
vala: More thorough check of ValueType and set CodeNode.error on failure
vala/valadelegatetype.vala | 2 ++
vala/valaobjecttype.vala | 2 ++
vala/valavaluetype.vala | 13 ++++++++++++-
3 files changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/vala/valadelegatetype.vala b/vala/valadelegatetype.vala
index 9821a9e70..9d831954a 100644
--- a/vala/valadelegatetype.vala
+++ b/vala/valadelegatetype.vala
@@ -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;
}
diff --git a/vala/valaobjecttype.vala b/vala/valaobjecttype.vala
index 8e08ade76..11047ed4a 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 aa97f7c39..a9a6b7fd0 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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]