aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/field_access_of_slices.zig
blob: 1fbfda9646916ac61a61afe496065ca012a3dbeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
export fn entry() void {
    var slice: []i32 = undefined;
    const info = @TypeOf(slice).unknown;
    _ = info;
}

// error
// backend=stage2
// target=native
//
// :3:32: error: type '[]i32' has no members
// :3:32: note: slice values have 'len' and 'ptr' members