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

$this does not convey generic type #4725

Closed
staabm opened this issue Mar 19, 2021 · 2 comments
Closed

$this does not convey generic type #4725

staabm opened this issue Mar 19, 2021 · 2 comments
Labels
Milestone

Comments

@staabm
Copy link
Contributor

staabm commented Mar 19, 2021

Bug report

Code snippet that reproduces the problem

I don't expect the error

Method ClxProductNet_Model_Mapper_Ada::x() should return Clx_Paginator_Adapter_Mapper<T of Application_Model_Ada> but returns Clx_Paginator_Adapter_Mapper<Clx_Model_Abstract>.

in https://phpstan.org/r/e39ce81e-f9fb-4adb-b30a-e47d43c306ab

because $this is beeing typed via

/**
 * @template T of \Application_Model_Ada
 * @extends Clx_Model_Mapper_Abstract<T>
 */

for the proper expected type

@staabm staabm changed the title $this does not convey generic type $this does not convey generic type Mar 19, 2021
@ondrejmirtes ondrejmirtes added this to the Generics milestone Mar 19, 2021
@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@a843d87

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants