File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
crates/swc_ecma_usage_analyzer/src/analyzer Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -95,13 +95,15 @@ where
9595 where
9696 F : FnOnce ( & mut UsageAnalyzer < S > ) -> Ret ,
9797 {
98+ let used_recursively = std:: mem:: take ( & mut self . used_recursively ) ;
99+
98100 let mut child = UsageAnalyzer {
99101 data : S :: new ( S :: need_collect_prop_atom ( & self . data ) ) ,
100102 marks : self . marks ,
101103 ctx : self . ctx . with ( BitContext :: IsTopLevel , false ) ,
102104 expr_ctx : self . expr_ctx ,
103105 scope : Default :: default ( ) ,
104- used_recursively : self . used_recursively . clone ( ) ,
106+ used_recursively,
105107 } ;
106108
107109 let ret = op ( & mut child) ;
@@ -114,6 +116,8 @@ where
114116 self . scope . merge ( child. scope , true ) ;
115117 self . data . merge ( kind, child. data ) ;
116118
119+ self . used_recursively = child. used_recursively ;
120+
117121 ret
118122 }
119123
You can’t perform that action at this time.
0 commit comments