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

Fix/issue 6791 #1065

Closed
wants to merge 6 commits into from
Closed

Fix/issue 6791 #1065

wants to merge 6 commits into from

Conversation

rajyan
Copy link
Contributor

@rajyan rajyan commented Mar 11, 2022

fixes phpstan/phpstan#6791

I implemented TypeError throw point in 4450e46 but handled it by writable type.

As in the issue, TypeError is only throwed when the native type is different from the assigned type.
For example,

/** @var int[] */
public array $array

Can assign string[] without TypeError even if it's an error in PHPStan.

@ondrejmirtes ondrejmirtes changed the base branch from master to 1.4.x March 11, 2022 13:13
@ondrejmirtes
Copy link
Member

Thank you, merged :)

@ondrejmirtes
Copy link
Member

@rajyan If it doesn' bother you, please also send a regression test for phpstan/phpstan#6786. And base it on the 1.4.x branch, thanks.

@rajyan
Copy link
Contributor Author

rajyan commented Mar 11, 2022

Sure!

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