Incorrect subscript resolution #1519

This commit is contained in:
Christoffer Lerno
2024-10-04 20:50:48 +02:00
parent 6fabecac1a
commit cfc1d0d8f8
10 changed files with 78 additions and 32 deletions

View File

@@ -8,12 +8,12 @@ fn void! test_clear() @test
s.append_repeat('x', 63);
assert(s.capacity() == 64);
assert(s.len() == 63);
char* addr = &s[0];
char* addr = (char*)s.str_view();
s.clear();
assert(s.capacity() == 64);
assert(s.len() == 0);
s.append_repeat('x', 63);
assert(s.capacity() == 64);
assert(s.len() == 63);
assert(addr == &s[0]);
assert(addr == (char*)s.str_view());
}