mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Dynamic protocols.
This commit is contained in:
committed by
Christoffer Lerno
parent
4cc30c0d33
commit
49c4595457
@@ -13,7 +13,7 @@ fn void EnumMap.init(&self, ValueType init_value)
|
||||
}
|
||||
}
|
||||
|
||||
fn usz! EnumMap.to_format(&self, Formatter* formatter) @dynamic
|
||||
fn usz! EnumMap.to_format(&self, Formatter* formatter) : Printable
|
||||
{
|
||||
usz n = formatter.print("{ ")!;
|
||||
foreach (i, &value : self.values)
|
||||
@@ -25,7 +25,7 @@ fn usz! EnumMap.to_format(&self, Formatter* formatter) @dynamic
|
||||
return n;
|
||||
}
|
||||
|
||||
fn String EnumMap.to_string(&self, Allocator* using = mem::heap()) @dynamic
|
||||
fn String EnumMap.to_string(&self, Allocator* using = mem::heap()) : Printable
|
||||
{
|
||||
return string::printf("%s", *self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user