Using Eclipse Helios:
If I define a simple Javascript function
/**
* @returns {Number}
* @param {String} arg
*/
function test(arg)
{
return 1;
}
- the tags were those automatically added by Alt-Shift0J - then the inferred type for the function is:
Number test(any arg) Parameters: {String} arg @returns {Number}
Note the "any arg", despite also Eclipse also recognising the parameter is "{String} arg" later.
Nothing I've tried get the inferred type of the arg to be anything other than "any". This means calling the function with a non-String isn't detected, which is a pity.
So, is this a bug? Not supposed to work? Something I'm doing wrong?