1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: verify mutability of method args

This commit is contained in:
Alexander Medvednikov
2020-09-27 03:14:24 +02:00
parent 914c1a527d
commit e2c7126d11
7 changed files with 97 additions and 15 deletions

View File

@@ -86,7 +86,7 @@ pub fn (f &File) read_bytes(size int) []byte {
// read_bytes_at reads bytes at the given position in the file
pub fn (f &File) read_bytes_at(size, pos int) []byte {
mut arr := []byte{len: size}
nreadbytes := f.read_bytes_into(pos, arr) or {
nreadbytes := f.read_bytes_into(pos, mut arr) or {
// return err
return []
}