File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,23 +227,27 @@ module ts {
227227 if ( symbolKind & SymbolFlags . HasLocals ) {
228228 node . locals = { } ;
229229 }
230+
230231 var saveParent = parent ;
231232 var saveContainer = container ;
232233 var savedBlockScopeContainer = blockScopeContainer ;
233234 parent = node ;
234235 if ( symbolKind & SymbolFlags . IsContainer ) {
235236 container = node ;
236- // If container is not on container list, add it to the list
237- if ( lastContainer !== container && ! container . nextContainer ) {
238- if ( lastContainer ) {
239- lastContainer . nextContainer = container ;
240- }
241- lastContainer = container ;
237+ Debug . assert ( container . nextContainer === undefined ) ;
238+
239+ if ( lastContainer ) {
240+ Debug . assert ( lastContainer . nextContainer === undefined ) ;
241+ lastContainer . nextContainer = container ;
242242 }
243+
244+ lastContainer = container ;
243245 }
246+
244247 if ( isBlockScopeContainer ) {
245248 blockScopeContainer = node ;
246249 }
250+
247251 forEachChild ( node , bind ) ;
248252 container = saveContainer ;
249253 parent = saveParent ;
You can’t perform that action at this time.
0 commit comments