phan
phan copied to clipboard
`@return mixed` annotation suppressed errors about nulls being used even with `allow_overriding_vague_return_types` set to true
Reproduce
With allow_overriding_vague_return_types set to true:
/**
* @return mixed
*/
function returns_nullable() {
// if ... return sth not null
return null;
}
echo returns_nullable();
Expected
PhanTypeSuspiciousEcho Suspicious argument returns_nullable() of type null for an echo/print statement