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

Fix duplicate vars at top level #349

Merged
merged 1 commit into from
May 28, 2015

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented May 28, 2015

To see the problem this patch fixes, look at the first line of lib/cli.js:

var $0, $0, ...

The Program node handler was attempting to deduplicate with nub, but
doing so over a list of JS.Identifiers, not a list of plain strings.

Since most callers of declarationsNeededRecursive are more interested
in the set of names than the identifier nodes, I changed it to do that.

@michaelficarra
Copy link
Owner

Please rebase.

To see the problem this patch fixes, look at the first line of
lib/cli.js:

```js
var $0, $0, ...
```

The Program node handler was attempting to deduplicate with `nub`, but
doing so over a list of JS.Identifiers, not a list of plain strings.

Since most callers of `declarationsNeededRecursive` are more interested
in the set of names than the identifier nodes, I changed it to do that.
@ef4
Copy link
Contributor Author

ef4 commented May 28, 2015

Rebased and recompiled lib.

michaelficarra added a commit that referenced this pull request May 28, 2015
Fix duplicate vars at top level
@michaelficarra michaelficarra merged commit 1de9cf2 into michaelficarra:master May 28, 2015
@michaelficarra
Copy link
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants