Skip to content

Add arity check to type compatibility method checking #1153

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

Open
rjmholt opened this issue Feb 27, 2019 · 0 comments
Open

Add arity check to type compatibility method checking #1153

rjmholt opened this issue Feb 27, 2019 · 0 comments

Comments

@rjmholt
Copy link
Contributor

rjmholt commented Feb 27, 2019

The UseCompatibleTypes rule has access to information about how many parameters and what types methods take.

Type resolution in PowerShell would be fairly difficult, but checking the number of arguments of a method is pretty easy to do.

As a stretch, the overload could be determined and checked properly in cases where an argument is statically determinable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants