mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
repl: execute REPL tests ~1.5x to 2x faster
This commit is contained in:

committed by
Alexander Medvednikov

parent
64a9f43405
commit
d92291dd76
11
vlib/compiler/tests/repl/immutable_len_fields/fields.2.repl
Normal file
11
vlib/compiler/tests/repl/immutable_len_fields/fields.2.repl
Normal file
@ -0,0 +1,11 @@
|
||||
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
|
Reference in New Issue
Block a user