| 1 | const expectEqual = @import("std").testing.expectEqual; |
| 2 | |
| 3 | test "example" { |
| 4 | var array = [_]i32{ 1, 2, 3, 4 }; |
| 5 | var runtime_start: usize = 1; |
| 6 | _ = &runtime_start; |
| 7 | const length = 2; |
| 8 | const array_ptr_len = array[runtime_start..][0..length]; |
| 9 | try expectEqual(*[length]i32, @TypeOf(array_ptr_len)); |
| 10 | } |
| 11 | |
| 12 | // test |