mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
12 lines
196 B
Plaintext
12 lines
196 B
Plaintext
mut a := []string
|
|
a.len = 0 // Error (field len immutable)
|
|
'BYE'
|
|
===output===
|
|
cannot modify immutable field `len` (type `array`)
|
|
declare the field with `mut:`
|
|
struct array {
|
|
mut:
|
|
len int
|
|
}
|
|
BYE
|