Hi internals, In the nullable types we do not allow implicit return null/return with no value to fulfill a nullable type.
- No return will result in a TypeError when executed - Return with no value will be an actual fatal error, which I believe is due to the fact it's not found at runtime, should be a TypeError or ParseError if possible? - Return explicit null is fine (as expected) See: https://3v4l.org/h6IYF I believe the first two are contrary to PHP's "null is always returned if nothing else is". OTOH, it makes sense as it's the entire reasoning behind return void vs return null. This behavior is completely undocumented in the RFC. It's definitely something we should make an explicit decision on for the language spec if nothing else. We should also make any decisions on this prior to beta3 in < 2 weeks. Thoughts? - Davey