From c2ae65c7cfd4b6ba975f20022710a2457d82340b Mon Sep 17 00:00:00 2001 From: Akuli Date: Mon, 13 Jan 2025 00:40:49 +0200 Subject: [PATCH] free self of method calls --- compiler/ast.jou | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/ast.jou b/compiler/ast.jou index 43e31b3f..e4ed4207 100644 --- a/compiler/ast.jou +++ b/compiler/ast.jou @@ -454,6 +454,9 @@ class AstCall: for i = 0; i < self->nargs; i++: self->args[i].free() free(self->args) + if self->method_call_self != NULL: + self->method_call_self->free() + free(self->method_call_self) # Useful for formatting error messages, but not much else. # TODO: use this