You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm not sure how to describe this error, but:
When implementing method with variadic templated type - that type becomes array<int, T>. For example: TKey becomes array<int, TKey>.
Bug report
Hi, I'm not sure how to describe this error, but:
When implementing method with variadic templated type - that type becomes
array<int, T>
. For example:TKey
becomesarray<int, TKey>
.(full examples below)
Am I doing something wrong? :) Or this is a bug?
Code snippet that reproduces the problem
https://phpstan.org/r/1e9e5aab-3494-40bb-ab40-fe58993224af
https://phpstan.org/r/d78732e7-1bbb-41d4-bba6-e7dd6e6fd36c
The same error occurs with variadic syntax
TKey ...$keys
:https://phpstan.org/r/25ea56c5-c03b-426d-b274-a0fda1df4b60
"Concrete variadic" types are ok:
https://phpstan.org/r/2ebfc221-b297-4c58-9843-e89f72666b98
Passing
int
asTKey
by@implements
does not produce error:https://phpstan.org/r/6bb97423-efe2-4ed7-b78e-dd334d67e7d2
Expected output
No errors like in https://psalm.dev/r/e8a2f1414d or https://psalm.dev/r/d8ad951558
The text was updated successfully, but these errors were encountered: