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

Incorrect use of templated parameters for static functions in templated interfaces #149

Open
LuckyRu opened this issue Aug 18, 2021 · 3 comments
Milestone

Comments

@LuckyRu
Copy link

LuckyRu commented Aug 18, 2021

Example: https://psalm.dev/r/a2b077f2e5
Comment of @weirdan: vimeo/psalm#2571 (comment)

@ogizanagi
Copy link
Member

Hmm, so we need to add the @template T of int|string line to each static methods, but using the same template name (T) would generate a "Duplicate template param T in docblock for EnumInterface::get" so we need to use another name… this is a bit annoying :/

@LuckyRu
Copy link
Author

LuckyRu commented Aug 19, 2021

I think we don't need templates in static methods

@bendavies
Copy link
Contributor

i guess this is the cause of this psalm error:
Argument 1 of USState::accepts expects Elao\Enum\T, string provided

@ogizanagi ogizanagi added this to the 1.x milestone Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants