$elif deprecated.

This commit is contained in:
Christoffer Lerno
2023-03-20 16:54:45 +01:00
parent 02d073675a
commit 9c145996b0
19 changed files with 197 additions and 142 deletions

View File

@@ -302,13 +302,14 @@ macro void DString.append(DString* str, value)
$case Char32:
str.append_char32(value);
$default:
$if (@convertible(value, Char32))
str.append_char32(value);
$elif (@convertible(value, String))
str.append_chars(value);
$else
$assert(false, "Unsupported type for append use printf instead.");
$endif
$switch
$case @convertible(value, Char32):
str.append_char32(value);
$case @convertible(value, String):
str.append_chars(value);
$default:
$assert(false, "Unsupported type for append use printf instead.");
$endswitch
$endswitch
}