-
-
Notifications
You must be signed in to change notification settings - Fork 154
[Regression] Inferred types #1126
Copy link
Copy link
Closed
phpactor/worse-reflection
#73Description
I forgot that I had found a regression, I reproduced it today so I put an example here in order to not forget to fix it:
<?php
namespace Test;
interface Foo
{
}
class FooBar implements Foo
{
}
class Bar
{
private Foo $foo;
public function __construct(Foo $foo)
{
$this->foo = $foo;
}
public function foo(): void
{
if (!$this->foo instanceof FooBar) {
return;
}
// $this is now inferred as FooBar
}
}It's all in the comment, kind of really annoying 😄
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels