Bug report
Code snippet that reproduces the problem
https://phpstan.org/r/0499d145-4d75-4d7f-8e13-168d3562738c
<?php declare(strict_types = 1);
/**
* @phpstan-type Data array{customer?: array{first_name: string}}
*/
class Foo
{
/** @var Data */
private array $data = [];
public function getFirstName(): ?string
{
return $this->data['customer']['first_name'] ?? null;
}
}
Expected output
No errors should be reported.
#3171 and #4592 are maybe related, but not exactly the same.