File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -647,6 +647,7 @@ type Checker struct {
647647 iterationTypesCache map[IterationTypesKey]IterationTypes
648648 markerTypes collections.Set[*Type]
649649 resolvingExplicitTypeOfSymbol collections.Set[*ast.Symbol]
650+ constructorOrFunctionChecked collections.Set[*ast.Symbol]
650651 undefinedSymbol *ast.Symbol
651652 argumentsSymbol *ast.Symbol
652653 requireSymbol *ast.Symbol
@@ -3492,8 +3493,7 @@ func (c *Checker) checkFunctionOrMethodDeclaration(node *ast.Node) {
34923493
34933494func (c *Checker) checkFunctionOrConstructorSymbol(symbol *ast.Symbol) {
34943495 // Only check the symbol once
3495- if links := c.valueSymbolLinks.Get(symbol); !links.functionOrConstructorChecked {
3496- links.functionOrConstructorChecked = true
3496+ if c.constructorOrFunctionChecked.AddIfAbsent(symbol) {
34973497 c.checkFunctionOrConstructorSymbolWorker(symbol)
34983498 }
34993499}
Original file line number Diff line number Diff line change @@ -180,13 +180,12 @@ type SymbolReferenceLinks struct {
180180// Links for value symbols
181181
182182type ValueSymbolLinks struct {
183- resolvedType * Type // Type of value symbol
184- writeType * Type
185- target * ast.Symbol
186- mapper * TypeMapper
187- nameType * Type
188- containingType * Type // Mapped type for mapped type property, containing union or intersection type for synthetic property
189- functionOrConstructorChecked bool
183+ resolvedType * Type // Type of value symbol
184+ writeType * Type
185+ target * ast.Symbol
186+ mapper * TypeMapper
187+ nameType * Type
188+ containingType * Type // Mapped type for mapped type property, containing union or intersection type for synthetic property
190189}
191190
192191// Additional links for mapped symbols
You can’t perform that action at this time.
0 commit comments