> On Apr 25, 2021, at 15:12, David Rodrigues <david.pro...@gmail.com> wrote:
> 
> 3. Poorly typed functions or methods cannot be overloaded.
> 
> function printId(User $user) { ... }
> function printId($user) { ... } // Fatal error


Since the second is the same as `mixed $user`, why couldn’t the engine
pick the most specific method for the signature? If a `User` instance
is passed, then pick the first method. Otherwise, pick the second.

Cheers,
Ben

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to