Add @castable and @convertible builtin macros, removes the need $castable and $convertible

This commit is contained in:
Christoffer Lerno
2022-09-20 22:18:00 +02:00
parent 48ee567f81
commit 4d5821408d
12 changed files with 12 additions and 77 deletions

View File

@@ -267,9 +267,9 @@ macro void String.append(String* str, value)
$case Char32:
str.append_char32(value);
$default:
$if ($convertible($Type, Char32)):
$if (@convertible($Type, Char32)):
str.append_char32(value);
$elif ($convertible($Type, char[])):
$elif (@convertible($Type, char[])):
str.append_chars(value);
$else:
$assert("Unsupported type for appending");