Conversation
|
Hi, could you achieve the same behaviour by modifying IsAFunctionTypeSpecifyingExtension instead? The |
|
If I understand |
|
@b1rdex Nope, just the logic of |
|
So I finally learned the thing: return $this->typeSpecifier->create(
$node,
new ConstantBooleanType(false),
$context
);sets the function return type to if (is_a(Bar::class, Foo::class)) {
dumpType(is_a(Bar::class, Foo::class));
}and it dumps if ($a = is_a(Bar::class, Foo::class)) {
dumpType($a);
}and it dumps |
efd31ce to
0471f87
Compare
ddd20b4 to
95d480b
Compare
|
@ondrejmirtes I think we can close this one as well then |
just posting the anwser here, since I also worked thru this recently: the cited code is not correct. instead it works like this:
|
|
Implemented a different way here: #1311 |
Fixes phpstan/phpstan#4371