aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/pointer_arithmetic_on_pointer-to-array.zig
blob: e97a098f40ce53338c19b61addb8dad48fa24d3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export fn foo() void {
    var x: [10]u8 = undefined;
    var y = &x;
    var z = y + 1;
    _ = z;
}

// error
// backend=stage2
// target=native
//
// :4:15: error: incompatible types: '*[10]u8' and 'comptime_int'
// :4:13: note: type '*[10]u8' here
// :4:17: note: type 'comptime_int' here