Validator->Errors/Warnings) Now i habe th..." /> Validator->Errors/Warnings) Now i habe th..." /> Validator->Errors/Warnings) Now i habe th..."/>

JSDT - Variable never read - bug or feature?

66 Views Asked by At

In eclipse using a JavaScript project i set the never-read-variable-scanner to "error" (Alt+wp, JavaScript->Validator->Errors/Warnings)

Now i habe the function "MyFunction"

function MyFunction() {
    var self = this;
    function getSelf() {
        return self;
    }
    return {
        getThis : +getSelf
    };
}

Everything works fine. But if i remove the + sign, its telling me self is never read.

Is it a bug or a feature and why?

1

There are 1 best solutions below

1
On BEST ANSWER

It's maybe a BUG, try this code in other IDE and if this work, the problem is on eclipse