navid/haze / master / samples/baseline_2.9/str_immutable_error.hz

str_immutable_error.hz

← samples/baseline_2.9 · 125 bytes · raw · download

// Strings are immutable; mutate their bytes instead.

fn main() {
    var text = "hello"
    text[0] = 72
    print(text)
}