vxx2 / vlib / v / checker / tests / string_index_assign_error.out
7 lines · 7 sloc · 318 bytes · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1vlib/v/checker/tests/string_index_assign_error.vv:3:3: error: cannot assign to s[i] since V strings are immutable
2(note, that variables may be mutable but string values are always immutable, like in Go and Java)
3 1 | fn main() {
4 2 | mut a := 'V is great!!'
5 3 | a[0] = `R`
6 | ~~~
7 4 | }
8