@@ -41,7 +41,7 @@ impl<'a> Binder for VariableDeclarator<'a> {
4141 // Logic for scope hoisting `var`
4242
4343 let mut var_scope_ids = vec ! [ ] ;
44- if !builder. scope . get_flags ( current_scope_id ) . is_var ( ) {
44+ if !builder. current_scope_flags ( ) . is_var ( ) {
4545 for scope_id in builder. scope . ancestors ( current_scope_id) . skip ( 1 ) {
4646 if builder. scope . get_flags ( scope_id) . is_var ( ) {
4747 var_scope_ids. push ( scope_id) ;
@@ -106,8 +106,7 @@ impl<'a> Binder for Function<'a> {
106106 fn bind ( & self , builder : & mut SemanticBuilder ) {
107107 let current_scope_id = builder. current_scope_id ;
108108 if let Some ( ident) = & self . id {
109- let flags = builder. scope . get_flags ( current_scope_id) ;
110- if !flags. is_strict_mode ( )
109+ if !builder. current_scope_flags ( ) . is_strict_mode ( )
111110 && matches ! (
112111 builder. nodes. parent_kind( builder. current_node_id) ,
113112 Some ( AstKind :: IfStatement ( _) )
@@ -158,7 +157,7 @@ impl<'a> Binder for Function<'a> {
158157 }
159158
160159 // bind scope flags: Constructor | GetAccessor | SetAccessor
161- debug_assert ! ( builder. scope . get_flags ( current_scope_id ) . contains( ScopeFlags :: Function ) ) ;
160+ debug_assert ! ( builder. current_scope_flags ( ) . contains( ScopeFlags :: Function ) ) ;
162161 if let Some ( kind) = builder. nodes . parent_kind ( builder. current_node_id ) {
163162 match kind {
164163 AstKind :: MethodDefinition ( def) => {
0 commit comments