Incorrect return type error when using call method (JavaScript)...

In the following example I get a warning within the call to Math.min that the "Argument type Function is not assignable to parameter type Number".  Is this a bug or am I doing something wrong?

     * @returns {number}
    function foo() {
        return 2;

    var x = Math.min(0,;

Comment actions Permalink

Hi Mark. Looks like a regression. I've created an issue, please watch it.

Thanks for reporting!

Comment actions Permalink

Thank you Konstantin.


Please sign in to leave a comment.