diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-12-12 18:47:53 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-01-09 10:11:53 +0100 |
commit | e8696a89b298e230386e7375193d142cc3f167ca (patch) | |
tree | 550436eca79971c2b4ce198efab50160b4f72fa0 | |
parent | 2343e3fcd6add34d8ce6e46a1a881661efa2ecab (diff) | |
download | vala-e8696a89b298e230386e7375193d142cc3f167ca.tar.gz |
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.
-rw-r--r-- | vala/valacreationmethod.vala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vala/valacreationmethod.vala b/vala/valacreationmethod.vala index 9abc03007..a8910e5c3 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); |