Repository navigation
Only apply indexed access write simplifications to types that arise from mutation - #33089
Jack Williams (jack-williams) wants to merge 1 commit into
Conversation
6be03d6 to
0f748a9
Compare
Wesley Wigham (weswigham)
left a comment
There was a problem hiding this comment.
there are code paths that do not get write-simplified (with and without this PR) which introduce unsoundness. Is this by design?
Yeah; element accesses are generally slightly unsound.
This approach looks fine to me, but we'll need to sync it and run the extended test suites on it. Also ping Anders Hejlsberg (@ahejlsberg) since I imagine he'll be interested in it.
Wesley Wigham (@weswigham), will do! FWIW, very few people seem to have stumbled upon this issue so maybe it isn't worth the additional complexity. |
|
Unfortunately, we never finished reviewing this PR. It is pretty old now, so I'm going to close it to reduce the number of open PRs. |
This is an attempt at alleviate some additional errors introduced by #30769. The write simplifications introduced there were applied whenever a type was related to an indexed access type, irrespective of whether that type denoted a real update or just a value of lookup-type.
This PR only applies the write simplifications to indexed access types that arise through assignments to element access expressions.
Fixes #31833
Fixes #32816
A related digression: there are code paths that do not get write-simplified (with and without this PR) which introduce unsoundness. Is this by design?