Make local function default parameter value binding lazy (#17014)
Make local function default parameter value binding lazy Current strict binding can cause circularity problems when local functions are referenced. This change causes local functions to use lazy default parameter binding, similar to methods, and then forces their construction when diagnostics are requested for the local function. This also requires a mechanism for recording declaration diagnostics outside of adding to the compilation's DeclarationDiagnostics. A new type, DeclarationDiagnosticStore is introduced as an abstraction to store declaration diagnostics on either the compilation or in a local DiagnosticBag, depending on the needs of the symbol storing diagnostics. Fixes #16451, #17293
Showing
想要评论请 注册 或 登录