diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-22 14:54:30 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-22 14:54:30 +0100 |
| commit | 7bd1039a49e5fd771569cd1b5bca5b076d464a5f (patch) | |
| tree | 06382e3a2cf5bb813981faac87086d4c736b1664 /src/ir.cpp | |
| parent | 76a230372f59e873b09ce333fd466b433697b936 (diff) | |
Selector Call Expressions: `x->y(123) == x.y(x, 123)`
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 2127de7b4..b8b2bd46e 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -7678,6 +7678,13 @@ irValue *ir_build_expr_internal(irProcedure *proc, Ast *expr) { return ir_add_module_constant(proc->module, tv.type, tv.value); case_end; + case_ast_node(se, SelectorCallExpr, expr); + GB_ASSERT(se->modified_call); + TypeAndValue tav = type_and_value_of_expr(expr); + GB_ASSERT(tav.mode != Addressing_Invalid); + return ir_addr_load(proc, ir_build_addr(proc, se->call)); + case_end; + case_ast_node(te, TernaryExpr, expr); ir_emit_comment(proc, str_lit("TernaryExpr")); |