-
Notifications
You must be signed in to change notification settings - Fork 58
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
inference in case requires extra let #328
Comments
It can't resolve the ambiguity of Please can you include a complete failing example with reports, ideally minimised? It's so much easier, and so much more likely that I'll investigate an issue quickly, if I can just paste it into a file rather than having to work out what imports are needed, what extra definitions might be needed, etc. |
(I don't actually know on first looking why EDIT: Yes I do, in fact, it's to do with when it reruns delayed elaboration problems (if it encounters ambiguity, it will postpone elaboration). It needs to resolve the type of the scrutinee before it goes into the case block, but doesn't retry the delayed problems first. |
You need to include
|
Steps to Reproduce
Check
Expected Behavior
f
andg
both type check successfullyObserved Behavior
If I had to provide a type annotation in the
let
then I would understand that the compiler just couldn't work it out but the fact that the inference is successful in thelet
but not in thecase
seems very counter-intuitive.The text was updated successfully, but these errors were encountered: