-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Code snippet that reproduces the problem
class HelloWorld
{
public function sayHello(?int $a, ?int $b): void
{
if ($a === null && $b === null) {
throw new \LogicException();
}
$this->foo($a !== null ? $a : $b); // error: Parameter #1 $c of method HelloWorld::foo() expects int, int|null given.
}
public function foo(int $c){}
}Expected output
- calling foo should be ok
Reactions are currently unavailable