mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
New faults and syntax (#2034)
- Remove `[?]` syntax. - Change `int!` to `int?` syntax. - New `fault` declarations. - Enum associated values can reference the calling enum.
This commit is contained in:
committed by
GitHub
parent
fefce25081
commit
25bccf4883
@@ -109,7 +109,7 @@ fn Duration NanoDuration.to_duration(nd) => (Duration)nd / 1_000;
|
||||
fn NanoDuration Duration.to_nano(td) => (NanoDuration)td * 1_000;
|
||||
fn long Duration.to_ms(td) => (long)td / 1_000;
|
||||
|
||||
fn usz! NanoDuration.to_format(&self, Formatter* formatter) @dynamic
|
||||
fn usz? NanoDuration.to_format(&self, Formatter* formatter) @dynamic
|
||||
{
|
||||
NanoDuration nd = *self;
|
||||
if (nd == 0)
|
||||
|
||||
Reference in New Issue
Block a user