-
Notifications
You must be signed in to change notification settings - Fork 809
Inconsistent type inference #1592
Copy link
Copy link
Open
Labels
P-mediumWe may work on this issue if we find the timeWe may work on this issue if we find the time
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Checked that your issue isn't already filed.
- Reduced the issue to a self-contained, reproducible test case.
Description
This function:
def foo (a : Nat) (b) := a + bresolves to foo : Nat → Nat → Nat
But this one does not:
def foo (a : Nat) (b) : Nat := a + bsaying failed to infer binder type when the resulting type of a declaration is explicitly provided, all holes (e.g., _) in the header are resolved before the declaration body is processed
Steps to Reproduce
See above.
Expected behavior: [What you expect to happen]
Actual behavior: [What actually happens]
Reproduces how often: [What percentage of the time does it reproduce?]
Versions
Lean (version 4.0.0-nightly-2022-09-12, commit ec2372e, Release)
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P-mediumWe may work on this issue if we find the timeWe may work on this issue if we find the time