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
When using @template T in a function, Psalm assumes that there is a common ancestor for T, but this may not be the case, for example when array<T> is used.
In the example, a parameter to the function is array<class-string<T>,callable(T):string>,
meaning a class and a function that takes an object of this class to convert it to a string. T may for example be DateTime or DateInterval, these have no common ancestor.
The text was updated successfully, but these errors were encountered:
https://psalm.dev/r/9d4c7819b6
When using
@template T
in a function, Psalm assumes that there is a common ancestor for T, but this may not be the case, for example whenarray<T>
is used.In the example, a parameter to the function is
array<class-string<T>,callable(T):string>
,meaning a class and a function that takes an object of this class to convert it to a string. T may for example be DateTime or DateInterval, these have no common ancestor.
The text was updated successfully, but these errors were encountered: