- Trying to slice an indexable type leads to misleading error message #2958

This commit is contained in:
Christoffer Lerno
2026-02-20 00:13:45 +01:00
parent 392c78860d
commit 0387d7666d
3 changed files with 10 additions and 1 deletions

View File

@@ -0,0 +1,8 @@
import std;
fn int main()
{
List {int} int_list;
int[] int_slice = int_list[..]; // #error: You cannot slice 'List{int}'
return 0;
}