Allow indexing of constant strings. Fixed reverse indexing of constant initializers.

This commit is contained in:
Christoffer Lerno
2023-08-30 16:36:29 +02:00
parent dd0dc1a936
commit 82ba02a904
7 changed files with 76 additions and 19 deletions

View File

@@ -0,0 +1,15 @@
module subscripting_tests @test;
fn void subscript_ct()
{
$if int.nameof[0] == 'i':
assert(true);
$else
assert(false);
$endif
$if int.nameof[^1] == 't':
assert(true);
$else
assert(false);
$endif
}