-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(TextProcessing): Add task type template param to IManager and registerTPProvider #41844
Conversation
/backport to stable28 |
/backport to stable27 |
Where and why is it failing? |
It is failing when using implementations of IProvider, ie. when registering a provider or when passing a Task object to IManager#runTask or IManager#scheduleTask. See https://psalm.dev/docs/annotating_code/templated_annotations/#template-covariance |
Can you give a minimal example on what did not work which will now work, ideally on psalm.dev? |
I guess just adding a template param to the affected methods as well will fix this as well: https://psalm.dev/r/8fb724b093 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the details 👍
@come-nc Do you think we should do the covariant or add new template to the methods in questions as in my latest comment? |
a6e2d8d
to
6c5164c
Compare
038afc8
to
68d59d3
Compare
The covariant thing, because you might have a function that accept both |
@come-nc Agreed. |
fb49537
to
abf8655
Compare
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
abf8655
to
fe6d9e3
Compare
/backport to stable27 |
otherwise we cannot use them reasonably
Checklist