mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user