Re: Allow dropping typehints during inheritance
| From: | Levi Morrison | Date: | Sat, 14 Feb 2015 02:35:20 +0000 |
| Subject: | Re: Allow dropping typehints during inheritance | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82660@lists.php.net to get a copy of this message | ||
If you consider the lack of an explicit type to mean the theoretical
"Any" type which is a supertype of all types then dropping the hint is
a form of contravariance. I would prefer to support normal
contravariance for parameter types in which this is just a special
case. However, I am not sure I would be against it without regular
contravariance support if it came to a vote.