-
Notifications
You must be signed in to change notification settings - Fork 35
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
Type of nested map creation expression is not inferred correctly #378
Comments
I didn't think there would be any inference happening here, but now I see that there's actually some inference happening. In The problem with inferring the type of the map expression and then checking if it's a subtype of the expected type is that the map expression can contain any kind of expression below it. It'd be better if we can call |
The example comes from josefs#378.
The example comes from josefs#378.
@eksperimental in esl/gradient#30 reports an interesting bug, which I minimised to the following Elixir example:
It seems that nested map creation expressions don't get their type inferred properly, i.e. the associations are inferred as optional, whereas after map creation we know they must be present in the resulting map, therefore they should be inferred as required. One idea is that we might need some recursion in
update_map_type
, but this has to be confirmed.The text was updated successfully, but these errors were encountered: