mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Remove cast from void! to anyfault. Rename @catchof to @catch
This commit is contained in:
@@ -133,7 +133,7 @@ fn void main()
|
||||
bool! has_title = readWhetherTitleNonEmpty(url);
|
||||
// This looks a bit less than elegant, but as you see it's mostly due to having to
|
||||
// use printf here.
|
||||
io::printf(" Has title: %s vs %s\n", bool_to_string(has_title) ?? (@catchof(has_title)).nameof, has_title ?? false);
|
||||
io::printf(" Has title: %s vs %s\n", bool_to_string(has_title) ?? (@catch(has_title)).nameof, has_title ?? false);
|
||||
};
|
||||
dynamic_arena.reset();
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ fn int! askGuessMulti(int high)
|
||||
while (true)
|
||||
{
|
||||
int! result = askGuess(high);
|
||||
if (@catchof(result) == InputResult.NOT_AN_INT)
|
||||
if (@catch(result) == InputResult.NOT_AN_INT)
|
||||
{
|
||||
libc::printf("I didn't understand that.\n");
|
||||
err_count++;
|
||||
|
||||
Reference in New Issue
Block a user