Dynamic protocols.

This commit is contained in:
Christoffer Lerno
2023-10-04 23:10:59 +02:00
committed by Christoffer Lerno
parent 4cc30c0d33
commit 49c4595457
106 changed files with 2372 additions and 2011 deletions

View File

@@ -125,7 +125,7 @@ fn EnumSet EnumSet.xor_of(&self, EnumSet s)
$endif
}
fn usz! EnumSet.to_format(&set, Formatter* formatter) @dynamic
fn usz! EnumSet.to_format(&set, Formatter* formatter) : Printable
{
usz n = formatter.print("[")!;
bool found;
@@ -140,7 +140,7 @@ fn usz! EnumSet.to_format(&set, Formatter* formatter) @dynamic
return n;
}
fn String EnumSet.to_string(&set, Allocator* using = mem::heap()) @dynamic
fn String EnumSet.to_string(&set, Allocator* using = mem::heap()) : Printable
{
return string::printf("%s", *set);
}