public class Test
{
public static nint GetLength(string s) => s.Length;
public static int GetLengthAsInt(string s) => s.Length;
public static bool Run()
{
string() s = "foobar"; //FAIL: cl
string p = "foobar";
string() es = "";
string ep = "";
string u = "🦊";
#if TS
native {
// @ts-ignore
}
#endif
return s.Length == 6
&& p.Length == 6
&& "foobar".Length == 6
&& s.Length > 0
&& p.Length > 0
&& "foobar".Length > 0
&& s.Length != 0
&& p.Length != 0
&& "foobar".Length != 0
&& es.Length == 0
&& ep.Length == 0
&& "".Length == 0
&& "🦊".Length == u.Length;
}
}