| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| { | ||
| /** @var array{numeric-string} $b */ | ||
| $b = $a; | ||
| } |
There was a problem hiding this comment.
do we need more tests for different variants of this problem?
like
| } | |
| } | |
| /** | |
| * @param array{numeric-string&uppercase-string&lowercase-string} $a | |
| */ | |
| public function sayUpper(array $a): void | |
| { | |
| /** @var array{uppercase-string} $b */ | |
| $b = $a; | |
| } | |
| /** | |
| * @param array{numeric-string&uppercase-string&lowercase-string} $a | |
| */ | |
| public function sayLower(array $a): void | |
| { | |
| /** @var array{lowercase-string} $b */ | |
| $b = $a; | |
| } |
Sorry, something went wrong.
There was a problem hiding this comment.
maybe also variants with non-empty-string, non-falsey-string?
Sorry, something went wrong.
There was a problem hiding this comment.
I don't think so since it's not related to numeric-string directly.
The issue was because it was a ConstantArray with a lowercase-string or upercase-string inside.
Because of the early return $type we didn't process the content of the array.
Sorry, something went wrong.
There was a problem hiding this comment.
But I added a test for the callable case
ad97094
Sorry, something went wrong.
|
Thank you! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes phpstan/phpstan#12457