navid/haze / 29e7ef5e690b244d506a169b7a4f892c737395b40bafffaedbaf7b650bf94bb8 / 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)
}