mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Trying to slice an indexable type leads to misleading error message #2958
This commit is contained in:
8
test/test_suite/arrays/slice_no_overload.c3
Normal file
8
test/test_suite/arrays/slice_no_overload.c3
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user