'cannot reconcile upper and lower bound for template' message usability · Issue #3126 · vimeo/psalm · GitHub
More Web Proxy on the site http://driver.im/
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
Even here one could have a head scratching moment figuring out where do A and B come from. Now imagine that parameters come from one library, getting passed to another library, and types for both provided by independent plugins and it all starts looking like a support hell.
I would suggest to:
spell out the inference sources
get rid of 'uppper/lower bound' terminology and use 'subtype/supertype' instead
Example of adjusted message:
InvalidArgument: template type T inferred from argument 1 (class-string<T>) should be a subtype of type T inferred from argument 2 (callable(T):void)
The text was updated successfully, but these errors were encountered:
The fix for #3084 introduced new error message which I'm afraid will be extremely confusing for even the average Psalm user.
Consider this (simple) example: https://psalm.dev/r/8a21c26e0a
Even here one could have a head scratching moment figuring out where do A and B come from. Now imagine that parameters come from one library, getting passed to another library, and types for both provided by independent plugins and it all starts looking like a support hell.
I would suggest to:
Example of adjusted message:
The text was updated successfully, but these errors were encountered: