function types with void return type
# Lars T Hansen (18 years ago)
A bug, no doubt. I'll file it (bugs.ecmascript.org -- open to all comers).
My expectation would be a compile-time error if a void function tries to return a value since it's syntactically detectable, but I don't remember it being discussed in the group. (Obtaining the return value from a void function would be compile-time or run-time, depending on what the compiler knows.)
Language overview states: "The return type of a function can be written
void, which means that no return value is allowed.".
But the reference implementation doesn't complain about this:
4
Is the constraint described in the overview prose meant to be applied
here? If so, when?