Bug report
phpstan 0.12.33
Following code throws an error
Code snippet that reproduces the problem
https://phpstan.org/r/079841f1-1961-44a4-acfa-c8a308fea2fc
<?php declare(strict_types = 1);
trait Foo {
public function test(): void {
if (get_class($this) === HelloWorld::class) {
echo "OK";
}
if (get_class($this) === OtherClass::class) {
echo "OK";
}
}
}
class HelloWorld {
use Foo;
public function bar(): void {
$this->test();
}
}
class OtherClass {
use Foo;
public function bar(): void {
$this->test();
}
}
Expected output
No error
Additional notes
Might be related to #3632