Allocator uses protocols. Fix bug where it was not possible to pass a ref variable as a ref variable. Correct codegen for !anyptr.

This commit is contained in:
Christoffer Lerno
2023-10-14 02:09:11 +02:00
committed by Christoffer Lerno
parent 54f32ed71b
commit 89d4c2cab7
31 changed files with 1439 additions and 1431 deletions

View File

@@ -40,9 +40,9 @@ fn ByteBuffer*! ByteBuffer.init_with_buffer(&self, char[] buf)
return self;
}
fn void! ByteBuffer.free(&self)
fn void ByteBuffer.free(&self)
{
if (self.allocator) self.allocator.free(self.bytes)!;
if (self.allocator) self.allocator.free(self.bytes);
*self = {};
}