-
Notifications
You must be signed in to change notification settings - Fork 12.8k
null & {}
should not simplify to never
in a union
#28421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @ahejlsberg - I remember talking with you about this and weather intersections with |
@weswigham I see the issue in #26796, but I don't understand what the problem is here. The |
The |
Hmm. I don't think we want to start treating |
I'm going assign this back to you. With #28940 there is at least a way to explicitly request an |
While working on #28394 I was able to identify an issue with inference that was causing us to infer
{}
for a reverse mapped type's property types - the behavior of{}
in an intersection was itself very strange and is what actually led to the problem (otherwise the bad inference would probably never have been observable unless someone was using athis
type in their component!).In short, if I have
and I write
both assignments should work (under
strictNullChecks
), but they do not!The text was updated successfully, but these errors were encountered: