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

Error for excess / extra generic arguments passed to functions #149

Closed
kaleidawave opened this issue May 29, 2024 · 1 comment · Fixed by #160
Closed

Error for excess / extra generic arguments passed to functions #149

kaleidawave opened this issue May 29, 2024 · 1 comment · Fixed by #160
Labels
checking Issues around checking good-first-issue PRs welcome 🙏

Comments

@kaleidawave
Copy link
Owner

Currently there is no diagnostic raised for:

  • Passing explicit generic arguments to a non generic function
  • More generics arguments than a function has defined

To fix

  • Look in calling.rs for call_site_type_arguments which is passed and the function.type_parameter. If the former is passed but that latter is missing raise a FunctionCallingError.

This is already implemented for types with generics btw. And the opposite case is not necessary because that is handled by inference.

@kaleidawave kaleidawave added checking Issues around checking good-first-issue PRs welcome 🙏 labels May 29, 2024
@kaleidawave
Copy link
Owner Author

Implemented in #160 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checking Issues around checking good-first-issue PRs welcome 🙏
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant