mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
repl: handle print and one-line conditions
This commit is contained in:

committed by
Alexander Medvednikov

parent
03bc5ab3d5
commit
30e7cd8ed5
@ -9,19 +9,19 @@ ints.len = 0 // Error (field len immutable)
|
||||
|
||||
println('BYE')
|
||||
===output===
|
||||
.vrepl_temp.v:2:5: cannot modify immutable field `len` (type `string`)
|
||||
.vrepl_temp.v:3:5: cannot modify immutable field `len` (type `string`)
|
||||
declare the field with `mut:`
|
||||
struct string {
|
||||
mut:
|
||||
len int
|
||||
}
|
||||
.vrepl_temp.v:3:5: cannot modify immutable field `len` (type `array`)
|
||||
.vrepl_temp.v:4:5: cannot modify immutable field `len` (type `array`)
|
||||
declare the field with `mut:`
|
||||
struct array {
|
||||
mut:
|
||||
len int
|
||||
}
|
||||
.vrepl_temp.v:4:8: cannot modify immutable field `len` (type `array`)
|
||||
.vrepl_temp.v:5:8: cannot modify immutable field `len` (type `array`)
|
||||
declare the field with `mut:`
|
||||
struct array {
|
||||
mut:
|
||||
|
Reference in New Issue
Block a user