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

// error
//
// :4:17: error: incompatible types: '*[10]u8' and 'comptime_int'
// :4:15: note: type '*[10]u8' here
// :4:19: note: type 'comptime_int' here