Resolver - Don't reset scope types while parsing function blocks
This commit is contained in:
parent
aa48973e23
commit
406400bf71
1 changed files with 1 additions and 1 deletions
|
@ -262,7 +262,7 @@ where
|
|||
}
|
||||
// Unlike the original Lox, function arguments and function bodies do
|
||||
// not use the same environment.
|
||||
rs.with_scope(|rs| body.resolve(rs), ScopeType::Function)
|
||||
rs.with_scope(|rs| body.resolve(rs), rs.current_type())
|
||||
}
|
||||
|
||||
/// Process all method definitions in a class.
|
||||
|
|
Loading…
Reference in a new issue