Consider if it would be advantageous to delay creation of ITypeSymbol instances returned by IOperation.Type API for C# #39646
Labels
Area-Compilers
Concept-Continuous Improvement
Concept-Design Debt
Engineering Debt, Design Debt, or poor product code quality
Feature - IOperation
IOperation
New Language Feature - Nullable Reference Types
Nullable Reference Types
After #39498, public symbols and internal symbols are no longer implemented by the same objects for C#. When we create IOperation nodes, we eagerly create ITypeSymbol instances that should be returned by IOperation.Type API. The same is happening for other symbols exposed by IOperation APIs. It was suggested during PR review (#39498 (comment)) that it might be advantageous to delay creation of ITypeSymbol (and perhaps other public symbols). Capture internal symbols in IOperation nodes instead and create public symbols only when requested by a consumer.
The text was updated successfully, but these errors were encountered: