You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed a strange error "Unable to resolve the template type ExpectedType" when executing the same statement twice. Please see the following example code:
Unable to resolve the template type ExpectedType in call to method static method PHPUnit\Framework\Assert::assertSame()
I'm unsure where to start debugging this. It seems self::A appears as ConstantIntegerType while self::B as NeverType but I'm yet lacking the understanding of the internals to go further. 😄
(Please ignore the fact that this code example will also produce the message "Call to static method PHPUnit\Framework\Assert::assertSame() with 1 and 0 will always evaluate to false. " - which is of course correct. I didn't want to create a more complex example only to get rid of this.)
The text was updated successfully, but these errors were encountered:
I noticed a strange error "Unable to resolve the template type ExpectedType" when executing the same statement twice. Please see the following example code:
I'm unsure where to start debugging this. It seems
self::A
appears asConstantIntegerType
whileself::B
asNeverType
but I'm yet lacking the understanding of the internals to go further. 😄Minimal needed config to produce the error:
I've created a small reproducer in case you want to check it out https://github.com/m-vo/phpstan-debug-ttype (
composer update && composer run phpstan
).(Please ignore the fact that this code example will also produce the message "Call to static method PHPUnit\Framework\Assert::assertSame() with 1 and 0 will always evaluate to false. " - which is of course correct. I didn't want to create a more complex example only to get rid of this.)
The text was updated successfully, but these errors were encountered: