Skip to content
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

Bug proof: missing type on return call #869

Closed
wants to merge 1 commit into from

Conversation

Slamdunk
Copy link
Contributor

@Slamdunk Slamdunk commented Mar 5, 2018

No description provided.

@ondrejmirtes
Copy link
Member

I don't understand this at all - what is this about?

@ondrejmirtes
Copy link
Member

If you want to report a bug, please create a new issue and adhere to the issue template - post a link to phpstan.org and include expected + actual output.

@Slamdunk
Copy link
Contributor Author

Slamdunk commented Mar 5, 2018

A test case is the best and more precise way to have a bug reported: you can pull the commit and start straightforwardly the debugging session.

@Slamdunk
Copy link
Contributor Author

Slamdunk commented Mar 5, 2018

@ondrejmirtes
Copy link
Member

Yep, but a pull request with a test without any context or description is really useless. What you're expecting? You want to have MissingTypeCall in the error description or is there anything more?

@ondrejmirtes
Copy link
Member

The thing is that AnyClass|object is simplified to object in the typesystem because if the return type can be any object, there's no point in adding another class to that. It does not add any information.

@Slamdunk
Copy link
Contributor Author

Slamdunk commented Mar 5, 2018

Yep, but a pull request with a test without any context or description is really useless. What you're expecting? You want to have MissingTypeCall in the error description or is there anything more?

Yes, nothing more than what test suite in the build shows.

The thing is that AnyClass|object is simplified to object in the typesystem because if the return type can be any object, there's no point in adding another class to that. It does not add any information.

Didn't know that: it suprised me to have a reported error that differs from the PHPDoc.

Ok then.

@Slamdunk Slamdunk deleted the missing_type_bugproof branch March 5, 2018 16:15
@ondrejmirtes
Copy link
Member

Yep, I will suggest do @JanTvrdik that we could point out this in a phpDoc rule - that it's sometimes possible to simplify your own phpDocs...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants