[php-src] Issue #7900: `never` return type for arrow functions with throw expressions
| From: | ricardoboss | Date: | Fri, 07 Jan 2022 13:27:08 +0000 |
| Subject: | [php-src] Issue #7900: `never` return type for arrow functions with throw expressions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-238856@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7900
Comment Author: ricardoboss
> Yes, PHP could add the return depending on whether the function is void/never or not.
This should only be necessary if the arrow function body solely contains a method/function call,
doesn't it? So a literal value would always require a return statement and would (rightly so)
cause a fatal error given a different return type.