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

@@ -12,7 +12,7 @@ struct ByteWriter
* @param [&inout] self
* @param [&in] using
* @require self.bytes.len == 0 "Init may not run on on already initialized data"
* @ensure using != null, self.index == 0
* @ensure (bool)using, self.index == 0
**/
fn ByteWriter* ByteWriter.init(&self, Allocator* using = mem::heap())
{