v/vlib/v/checker/tests/string_index_assign_error.out

8 lines
318 B
Plaintext
Raw Normal View History

vlib/v/checker/tests/string_index_assign_error.vv:3:6: error: cannot assign to s[i] since V strings are immutable
2020-08-13 23:33:18 +02:00
(note, that variables may be mutable but string values are always immutable, like in Go and Java)
1 | fn main() {
2 | mut a := 'V is great!!'
3 | a[0] = `R`
| ~~~
4 | }