[vala/staging: 1/3] vala: Improve semantic check of simple type structs
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 1/3] vala: Improve semantic check of simple type structs
- Date: Fri, 12 Mar 2021 09:18:42 +0000 (UTC)
commit d31ff0388567028c0c2a823a92d0b20dd1060120
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Mar 12 10:15:03 2021 +0100
vala: Improve semantic check of simple type structs
vala/valastruct.vala | 3 +++
vala/valavaluetype.vala | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/vala/valastruct.vala b/vala/valastruct.vala
index 120a7b086..4c4e28fdc 100644
--- a/vala/valastruct.vala
+++ b/vala/valastruct.vala
@@ -560,6 +560,9 @@ public class Vala.Struct : TypeSymbol {
}
}
+ // FIXME Perform this [SimpleType] check in a better way
+ is_disposable ();
+
if (!external && !external_package) {
bool has_instance_field = false;
foreach (Field f in fields) {
diff --git a/vala/valavaluetype.vala b/vala/valavaluetype.vala
index aa97f7c39..699046fb4 100644
--- a/vala/valavaluetype.vala
+++ b/vala/valavaluetype.vala
@@ -41,7 +41,7 @@ public abstract class Vala.ValueType : DataType {
}
unowned Struct? st = type_symbol as Struct;
- if (st != null) {
+ if (st != null && !st.error) {
return st.is_disposable ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]