Skip to content

Commit

Permalink
[[FIX]] Revert unnecessary commit
Browse files Browse the repository at this point in the history
This reverts commit 248e40b.

The issue which motivated this change related to the modification of the
environment record of ES6 concise methods. That issue was addressed in a
more comprehensive and concise manner via commit
b95f669 and verified with an equivalent
unit test.
  • Loading branch information
jugglinmike committed Jan 3, 2015
1 parent f46fe40 commit a70bbda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
9 changes: 4 additions & 5 deletions src/jshint.js
Expand Up @@ -447,8 +447,7 @@ var JSHINT = (function () {
}
}
} else {
if (((!state.option.shadow && !opts.param) ||
_.contains([ "inner", "outer" ], state.option.shadow)) &&
if ((!state.option.shadow || _.contains([ "inner", "outer" ], state.option.shadow)) &&
type !== "exception" || funct["(blockscope)"].getlabel(name)) {
warning("W004", state.tokens.next, name);
}
Expand Down Expand Up @@ -2736,7 +2735,7 @@ var JSHINT = (function () {
t = tokens[t];
if (t.id) {
params.push(t.id);
addlabel(t.id, { type: "unused", token: t.token, param: true });
addlabel(t.id, { type: "unused", token: t.token });
}
}
} else if (state.tokens.next.value === "...") {
Expand All @@ -2746,11 +2745,11 @@ var JSHINT = (function () {
advance("...");
ident = identifier(true);
params.push(ident);
addlabel(ident, { type: "unused", token: state.tokens.curr, param: true });
addlabel(ident, { type: "unused", token: state.tokens.curr });
} else {
ident = identifier(true);
params.push(ident);
addlabel(ident, { type: "unused", token: state.tokens.curr, param: true });
addlabel(ident, { type: "unused", token: state.tokens.curr });
}

// it is a syntax error to have a regular argument after a default argument
Expand Down
14 changes: 0 additions & 14 deletions tests/unit/parser.js
Expand Up @@ -5136,17 +5136,3 @@ exports.testStrictDirectiveASI = function (test) {

test.done();
};

exports.testGH1928 = function (test) {
var code = [
"var foo = {",
" bar(bar) {",
" return bar;",
" }",
"};"
];

TestRun(test).test(code, { esnext: true });

test.done();
};

0 comments on commit a70bbda

Please sign in to comment.