Skip to content

Static return type and inheritance #4795

Answered by dktapps
kralmichal asked this question in Support
Discussion options

You must be logged in to vote

This looks like a problem with the handling of the native static return type. If you replace it with @return static, it works correctly: https://phpstan.org/r/96e3eb5b-dea4-499b-949c-5d8fc99d6db2

You should probably report a bug.

Replies: 1 comment 2 replies

Comment options

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

@kralmichal
Comment options

Answer selected by ondrejmirtes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants