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, foo.call(this));

2 comments

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

Thanks for reporting!

0

Please sign in to leave a comment.