parser: smartcast fix (#5756)
parent
f834276803
commit
e7cd496c31
|
@ -129,9 +129,9 @@ fn (mut p Parser) vweb() ast.ComptimeCall {
|
||||||
// copy vars from current fn scope into vweb_tmpl scope
|
// copy vars from current fn scope into vweb_tmpl scope
|
||||||
for stmt in file.stmts {
|
for stmt in file.stmts {
|
||||||
if stmt is ast.FnDecl {
|
if stmt is ast.FnDecl {
|
||||||
fn_decl := stmt as ast.FnDecl
|
if it.name == 'main.vweb_tmpl_$p.cur_fn_name' {
|
||||||
if fn_decl.name == 'main.vweb_tmpl_$p.cur_fn_name' {
|
fn_decl := it
|
||||||
tmpl_scope := file.scope.innermost(fn_decl.body_pos.pos)
|
tmpl_scope := file.scope.innermost(it.body_pos.pos)
|
||||||
for _, obj in p.scope.objects {
|
for _, obj in p.scope.objects {
|
||||||
if obj is ast.Var {
|
if obj is ast.Var {
|
||||||
mut v := it
|
mut v := it
|
||||||
|
|
Loading…
Reference in New Issue