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
@@ -1,7 +1,7 @@
|
||||
module conv_tests;
|
||||
import std::io;
|
||||
|
||||
fn void! comparison_helper_32_to_8(Char32 c32, String expected_output)
|
||||
fn void? comparison_helper_32_to_8(Char32 c32, String expected_output)
|
||||
{
|
||||
char[8] out;
|
||||
usz len = conv::char32_to_utf8(c32, &out)!;
|
||||
@@ -12,7 +12,7 @@ fn void! comparison_helper_32_to_8(Char32 c32, String expected_output)
|
||||
}
|
||||
}
|
||||
|
||||
fn void! comparison_helper_8_to_32(String in, Char32 c32)
|
||||
fn void? comparison_helper_8_to_32(String in, Char32 c32)
|
||||
{
|
||||
usz len = in.len;
|
||||
Char32 res = conv::utf8_to_char32(in.ptr, &len)!;
|
||||
|
||||
Reference in New Issue
Block a user