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

checker: check taking the address of map field outside unsafe block (#15737)

This commit is contained in:
yuyi
2022-09-13 15:04:21 +08:00
committed by GitHub
parent ac6167565e
commit e51f0be6db
4 changed files with 43 additions and 1 deletions

View File

@ -561,7 +561,9 @@ pub fn (mut p Parser) root_table() ? {
if p.tok.kind == .lsbr {
// Parse `[[table]]`
p.array_of_tables(mut &p.root_map)?
unsafe {
p.array_of_tables(mut &p.root_map)?
}
p.skip_next = true // skip calling p.next() in coming iteration
util.printdbg(@MOD + '.' + @STRUCT + '.' + @FN, 'leaving double bracket at "$p.tok.kind" "$p.tok.lit". NEXT is "$p.peek_tok.kind "$p.peek_tok.lit"')
} else if peek_tok.kind == .period {