From: Rico Tzschichholz Date: Sun, 12 Dec 2021 17:47:53 +0000 (+0100) Subject: vala: Set is_yield_expression in async context when chaining up to async base ctor X-Git-Tag: 0.55.1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29bef676c2eeb9d0b12cabff7e3af7ce0b93304e;p=thirdparty%2Fvala.git 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. --- diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala index dbfd74ff6..b64703634 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);