Skip to content

Interesting psalm error. #507

Answered by roxblnfk
sicet7 asked this question in Q&A
Jan 13, 2025 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Let's try the option 3.
For me, of object means "an instance of any class (not an int or string)." This is not @template-covariant, and you can narrow object down to any specific class. However, this breaks in the case of a parameter where you can only extend the type.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@sicet7
Comment options

@roxblnfk
Comment options

Answer selected by sicet7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants