[vala/0.52] vala: Set is_yield_expression in async context when chaining up to async base ctor
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.52] vala: Set is_yield_expression in async context when chaining up to async base ctor
- Date: Sun, 9 Jan 2022 09:21:18 +0000 (UTC)
commit b8cab300338cf67dc7f6d3f54a0a7829ba77e2c9
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Dec 12 18:47:53 2021 +0100
vala: Set is_yield_expression in async context when chaining up to async base ctor
vala-CRITICAL **: vala_member_access_get_inner: assertion 'self != NULL' failed
vala-CRITICAL **: vala_member_access_get_member_name: assertion 'self != NULL' failed
Avoid these spurious criticals and trigger the currently expected error.
vala/valacreationmethod.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala
index e59526dd9..d2ec69537 100644
--- a/vala/valacreationmethod.vala
+++ b/vala/valacreationmethod.vala
@@ -200,7 +200,11 @@ public class Vala.CreationMethod : Method {
context.analyzer.current_symbol = body;
context.analyzer.insert_block = body;
- var stmt = new ExpressionStatement (new MethodCall (new BaseAccess
(source_reference), source_reference), source_reference);
+ var base_call = new MethodCall (new BaseAccess (source_reference),
source_reference);
+ if (coroutine && cl.base_class.default_construction_method.coroutine)
{
+ base_call.is_yield_expression = true;
+ }
+ var stmt = new ExpressionStatement (base_call, source_reference);
body.insert_statement (0, stmt);
stmt.check (context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]