aboutsummaryrefslogtreecommitdiff
path: root/test/cases/compile_errors/assign_through_constant_pointer.zig
blob: 2437cbb4c027228ec9f057c53e32865316bf2997 (plain)
1
2
3
4
5
6
7
8
export fn f() void {
    var cstr = "Hat";
    cstr[0] = 'W';
}

// error
//
// :3:9: error: cannot assign to constant