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

gen: fix bug where unreached defer is executed (#8594)

This commit is contained in:
zakuro
2021-02-07 01:40:39 +09:00
committed by GitHub
parent de9813233f
commit fe9d062b41
5 changed files with 49 additions and 5 deletions

View File

@@ -333,6 +333,7 @@ pub:
skip_gen bool // this function doesn't need to be generated (for example [if foo])
pub mut:
stmts []Stmt
defer_stmts []DeferStmt
return_type table.Type
has_return bool
comments []Comment // comments *after* the header, but *before* `{`; used for InterfaceDecl
@@ -891,7 +892,8 @@ pub:
stmts []Stmt
pos token.Position
pub mut:
ifdef string
ifdef string
idx_in_fn int = -1 // index in FnDecl.defer_stmts
}
// `(3+4)`