diff --git a/vlib/arrays/arrays.v b/vlib/arrays/arrays.v index 0d7b6485bf1964..15f0064755a4e1 100644 --- a/vlib/arrays/arrays.v +++ b/vlib/arrays/arrays.v @@ -182,6 +182,7 @@ pub fn chunk[T](array []T, size int) [][]T { } pub struct WindowAttribute { +pub: size int step int = 1 } diff --git a/vlib/io/reader.v b/vlib/io/reader.v index 36714082ec0326..3bf1e7b835c10b 100644 --- a/vlib/io/reader.v +++ b/vlib/io/reader.v @@ -35,9 +35,9 @@ pub const read_all_grow_len = 1024 // ReadAllConfig allows options to be passed for the behaviour // of read_all. pub struct ReadAllConfig { - read_to_end_of_stream bool pub: - reader Reader + read_to_end_of_stream bool + reader Reader } // read_all reads all bytes from a reader until either a 0 length read diff --git a/vlib/v/checker/struct.v b/vlib/v/checker/struct.v index e6be9097dc38a8..8ceb882738c87a 100644 --- a/vlib/v/checker/struct.v +++ b/vlib/v/checker/struct.v @@ -743,13 +743,13 @@ or use an explicit `unsafe{ a[..] }`, if you do not want a copy of the slice.', if c.mod != type_sym.mod { if !field.is_pub { parts := type_sym.name.split('.') - mod_type := if parts.len > 1 { - parts#[-2..].join('.') - } else { - parts.last() - } for init_field in node.init_fields { if field.name == init_field.name { + mod_type := if parts.len > 1 { + parts#[-2..].join('.') + } else { + parts.last() + } c.error('cannot access private field `${field.name}` on `${mod_type}`', init_field.pos) break diff --git a/vlib/v/parser/parser.v b/vlib/v/parser/parser.v index 1da412f1d9e1cf..e657d9d2680a5b 100644 --- a/vlib/v/parser/parser.v +++ b/vlib/v/parser/parser.v @@ -106,10 +106,9 @@ mut: script_mode bool script_mode_start_token token.Token pub mut: - scanner &scanner.Scanner = unsafe { nil } - comments_mode scanner.CommentsMode = .skip_comments - table &ast.Table = unsafe { nil } - scope &ast.Scope = unsafe { nil } + scanner &scanner.Scanner = unsafe { nil } + table &ast.Table = unsafe { nil } + scope &ast.Scope = unsafe { nil } errors []errors.Error warnings []errors.Warning notices []errors.Notice