-
Notifications
You must be signed in to change notification settings - Fork 137
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
Fix incorrect type inference for InclusiveRange #2886
Comments
Did a bit of investigation on this. I can see that we don't support type inference of function arguments as suggested by this comment:
So seems like both the cases mentioned are not bugs but more of an existing limitation. I am happy to take a shot at adding this support but would it be possible to untie this with the InclusiveRange work? I would like to wrap up the grant work sooner if possible and then take this up unless we consider this to be a blocker for the InclusiveRange feature. Thoughts? cc: @turbolent |
I didn't realize we still had some gaps there. Aren't we already using this elsewhere, e.g. for the storage The work on the standard library identified this gap in the checker, but the work / grant for the standard library is not dependent on resolving these gaps, no worries. We might still need to address these gaps before shipping the feature, to avoid UX issues like shown in the description, but that is separate from your grant. I wouldn't consider this a bug, but rather just missing functionality in the type checker, as you shown 👍 |
Makes sense. If this is already an existing limitation, and fixing it requires changing the way type-parameters are type-checked in general, then yeah, we can/should do it separately 👍 Thanks for looking into this! |
@turbolent No, this hasn't improved. Please check this test: cadence/runtime/tests/checker/type_inference_test.go Lines 338 to 409 in 7e955a3
|
Looking into this |
Issue to be solved
https://github.com/onflow/cadence/pull/2523/files#r1361281514
Suggested Solution
No response
The text was updated successfully, but these errors were encountered: