Skip to content
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

Completion type match calculations for function items should consider the signature compatability #16053

Closed
Veykril opened this issue Dec 8, 2023 · 5 comments
Labels
A-completion autocompletion C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Dec 8, 2023

No description provided.

@jmintb
Copy link
Contributor

jmintb commented Dec 8, 2023

I am up for working on this :)

@Veykril
Copy link
Member Author

Veykril commented Dec 8, 2023

Okay, so the bigger picture here would be to have type_match consider coercions I think (which should fix this technically). But that seems a lot more tricky to get right, so instead we should just have compute_type_match consider FnDefs and the like specially which we can do via Type::as_callable I think. Roughly, we just need to check whether both types are "callables" and then match them according to the callables instead.

@Veykril
Copy link
Member Author

Veykril commented Dec 9, 2023

@jmintb I'm sorry, I just realized that was roughly what you were doing in your commit already (how embarassing) 😅 I think I misread something there yesterday when fixing up the PR. Can you just re-implement that part as a new PR (and maybe put the actual equivalence check logic behind a function in Callable (if you still want to, assuming you realized the same)?

@jmintb
Copy link
Contributor

jmintb commented Dec 28, 2023

No worries, I will do as you suggest :)

@Veykril
Copy link
Member Author

Veykril commented Jan 2, 2024

Fixed in #16136

@Veykril Veykril closed this as completed Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants