[PR][php-src][#1080][master] - Correct and test none/null return types distinction
| From: | noreply@php.net | Date: | Thu, 12 Feb 2015 23:00:15 +0000 |
| Subject: | [PR][php-src][#1080][master] - Correct and test none/null return types distinction | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-2314@lists.php.net to get a copy of this message | ||
You can view the Pull Request on github:
https://github.com/php/php-src/pull/1080
Pull Request Description:
Currently,
function foo(): int {} produces the "none returned" message yet
function foo(): int { return; } produces the "null returned" message. This is
incorrect: only return null; should produce the "null" message, the other two
clearly aren't returning anything.
This fixes it so that value-less return statements also produce the "none" message. It
also adds tests.