function types with void return type

Hallvord R. M. Steen hallvord at
Wed Nov 7 04:09:43 PST 2007

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:

>> type F = function(int,int):void;
>> var f:F=function(a,b){return a+b;};
>> f(2,2);

Is the constraint described in the overview prose meant to be applied  
here? If so, when?

Hallvord R. M. Steen
Core QA JavaScript tester, Opera Software
Opera - simply the best Internet experience

More information about the Es4-discuss mailing list