Unsound calls allowed on a function coming from a deferred indexed access when intersection is involved #54824
Labels
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
Bug Report
π Search Terms
deferred index access unsound call union intersection
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
There is no error even though it should be based on Ander's comment here. Note that the comment is about a different variant of this signature, one using
Extract
. Both theExtract
and intersection variants are essentially the same though - one errors today and one doesn't.π Expected behavior
I would expect to get an error here, just like in the
Extract
-based variant (TS playground)The text was updated successfully, but these errors were encountered: