Fix bugs relating to optional interface addr-of #2244.

This commit is contained in:
Christoffer Lerno
2025-06-27 15:02:12 +02:00
parent e986e3a8c0
commit df8904909b
6 changed files with 146 additions and 8 deletions

View File

@@ -2372,8 +2372,8 @@ static inline void llvm_emit_post_inc_dec(GenContext *c, BEValue *value, Expr *e
static void llvm_emit_dynamic_method_addr(GenContext *c, BEValue *value, Expr *expr)
{
llvm_emit_expr(c, value, expr->access_resolved_expr.parent);
llvm_emit_type_from_any(c, value);
llvm_value_rvalue(c, value);
llvm_emit_type_from_any(c, value);
LLVMValueRef introspect = LLVMBuildIntToPtr(c->builder, value->value, c->ptr_type, "");
Decl *dyn_fn = expr->access_resolved_expr.ref;