instance type hint needs to be overwritten

instance type hint should be able to overwritten

for example:
/** @var MY_PARENT_CLASS $a */
$a->do_something();

/** @var MY_CHILD_CLASS $a */
$a->do_another();

the second type hint will NOT take effect, $a is always type hint as MY_PARENT_CLASS no matter how it is re-assigned to another class.

The type hint should be overwritten.

Please sign in to leave a comment.