Repository navigation
Don't defer resolution of indexed access types with reducible object types for writing accesses - #54689
Don't defer resolution of indexed access types with reducible object types for writing accesses#54689Mateusz Burzyński (Andarist) wants to merge 3 commits into
Conversation
…types for writing accesses
| return o[k]; | ||
| } | ||
|
|
||
| // repro from https://github.com/microsoft/TypeScript/issues/54680 |
There was a problem hiding this comment.
So this regression was assessed as working as intended by Anders Hejlsberg (@ahejlsberg) here but arguably the same unsoundness can be observed in different scenarios (see here).
The new test case from #54834 doesn't manifest the same unsoundness from what I can tell though.
Wesley Wigham (weswigham)
left a comment
There was a problem hiding this comment.
Maybe just put the regressions in new test files so their variables don't have to have such funky, verbose names? I'm not a huge fan of the big omni-test files we sometimes add anyway - they're a massive pain to debug.
Otherwise, I think this is probably OK, pending a sync and verification that there are no unexpected regressions in the extended test suite.
|
Actually, this might have to be closed. Anders first assessed that this is working as intended here and later here. I find it problematic that a different variant of this still works though (see here) and I think that both should behave in the same way (but now one error and one doesn't). Perhaps that should be reported as a bug now - so both of them would error (?). |
|
Since it sounds like this is working as intended, I'm going to close it. |
fixes #54680
fixes #54834
regression from #53098
cc Anders Hejlsberg (@ahejlsberg)