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

checker: fix nested struct reference type field initialized check. (fix: #15741) (#15752)

This commit is contained in:
shove
2022-09-15 12:59:31 +08:00
committed by GitHub
parent 5719344653
commit 8b962f8446
111 changed files with 288 additions and 223 deletions

View File

@@ -19,7 +19,7 @@ const utf8_max = 0x10FFFF
// Checker checks a tree of TOML `ast.Value`'s for common errors.
pub struct Checker {
scanner &scanner.Scanner
scanner &scanner.Scanner = unsafe { nil }
}
// check checks the `ast.Value` and all it's children

View File

@@ -16,7 +16,7 @@ const (
// Decoder decode special sequences in a tree of TOML `ast.Value`'s.
pub struct Decoder {
scanner &scanner.Scanner
scanner &scanner.Scanner = unsafe { nil }
}
// decode decodes certain `ast.Value`'s and all it's children.

View File

@@ -51,7 +51,7 @@ pub struct Parser {
pub:
config Config
mut:
scanner &scanner.Scanner
scanner &scanner.Scanner = unsafe { nil }
prev_tok token.Token
tok token.Token
peek_tok token.Token
@@ -75,7 +75,7 @@ mut:
// `decode_values` is used to en- or disable decoding of values with the `decoder.Decoder`.
pub struct Config {
pub:
scanner &scanner.Scanner
scanner &scanner.Scanner = unsafe { nil }
run_checks bool = true
decode_values bool = true
}

View File

@@ -66,7 +66,7 @@ pub:
// A document can be constructed from a `string` buffer or from a file path
pub struct Doc {
pub:
ast &ast.Root
ast &ast.Root = unsafe { nil }
}
// parse_file parses the TOML file in `path`.