bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.61k stars 94 forks source link

Lost null type when using null safe operator #2799

Closed momala454 closed 6 months ago

momala454 commented 7 months ago

Describe the bug When we use a null safe operator, intelephense doesn't report that the type can be null

To Reproduce

class Hello
{
    public int $world;
}
function world(?Hello $hello): void
{
    $abc = $hello?->world;
    var_dump($abc);
}
world(null);

$abc is null, not an int

Expected behavior The type should be null|int

Screenshots image

Platform and version 1.10.2