- Added $kindof compile time function.

- Deprecated `@typekind` macro in favour of `$kindof`.
- Deprecated `@typeis` macro in favour of `$typeof(#foo) == int`.
This commit is contained in:
Christoffer Lerno
2025-08-27 20:38:12 +02:00
parent 7312c10b9e
commit 239d249f01
24 changed files with 169 additions and 150 deletions

View File

@@ -17,9 +17,9 @@ macro void trim_bench($trim_str, String $target = WHITESPACE_TARGET) => @pool()
runtime::@start_benchmark();
$switch:
$case @typeis($trim_str, String):
$case $typeof($trim_str) == String:
s1 = s2.trim($trim_str);
$case @typeis($trim_str, AsciiCharset):
$case $typeof($$trim_str) == AsciiCharset:
s1 = s2.trim_charset($trim_str);
$default: $error "Unable to determine the right String `trim` operation to use.";
$endswitch