Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[FIX]] Do not add cls method names to env. record
A recent refactoring of the class parsing logic [1] removed the function name inference logic (i.e. integration with the `nameStack` object) in favor of a similar codepath within the generic `doFunction` routine. By providing the method name to that routine, the change had an unintended side effect: method names were used to create new entries in the new environment record. This was observable from user code in the presence of JSHint's `unused` linting option: when set, methods would incorrectly shadow variables that shared the same name. Continue to rely on the `doFunction` method for name inference (limiting duplication), but disable the extension of the environment record for that case.
- Loading branch information
1 parent
b7faa24
commit 036f085
Showing
2 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters