Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"is a function" error on getter and setter #96

Closed
timendum opened this issue Mar 15, 2011 · 1 comment
Closed

"is a function" error on getter and setter #96

timendum opened this issue Mar 15, 2011 · 1 comment
Milestone

Comments

@timendum
Copy link
Contributor

I don't get the error "func is a function"
Here it is a sample:
var test = (function() {
var func = function() {},
innerTest = {
get func() { return func;},
set func(value) { func = value; }
};
innerTest = func;
return innerTest;
})();

I get a
Line 5 set func(value) { func = value; }
'func' is a function.

@valueof
Copy link
Member

valueof commented Apr 9, 2011

That was because JSHint parsed set func() as a function declaration and not function expression. I changed the behavior in 16230ca.

@valueof valueof closed this as completed Apr 9, 2011
jugglinmike pushed a commit to jugglinmike/jshint that referenced this issue Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants