[vala/staging: 5/6] 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/staging: 5/6] vala: More thorough check of ValueType and set CodeNode.error on failure
- Date: Fri, 15 Oct 2021 10:23:52 +0000 (UTC)
commit ba0d8e95c28f299170766c98ec4d8bf451da92d1
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 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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]