vscode-intelephense
vscode-intelephense copied to clipboard
Intersected types should produce intersected property type
class A
{
public int $a;
public array $other;
}
class B
{
public int $b;
}
/** @param A&object{other: array<B>} $x */
function hello(object $x): void
{
$other = $x->other;
}
$x->other is array<B>
, but intelephense only display array
. Phpstan properly detect array<B>
Originally posted by @momala454 in https://github.com/bmewburn/vscode-intelephense/issues/2973#issuecomment-2285560103