Fix uses of @convertible.

This commit is contained in:
Christoffer Lerno
2023-10-26 22:21:16 +02:00
parent 70e7e4b1d2
commit a0bc03a9f5
3 changed files with 4 additions and 4 deletions

View File

@@ -282,9 +282,9 @@ macro void DString.append(&self, value)
self.append_char32(value);
$default:
$switch
$case @convertible(value, Char32):
$case $assignable(value, Char32):
self.append_char32(value);
$case @convertible(value, String):
$case $assignable(value, String):
self.append_chars(value);
$default:
$error "Unsupported type for append use printf instead.";

View File

@@ -136,7 +136,7 @@ macro usz! print_gen(self, x)
$case DString:
return self.write(x.str_view());
$default:
$if @convertible(x, String):
$if $assignable(x, String):
return self.write((String)x);
$else
return printf("%s", x);