Skip to content

Emit related ranges for duplicate identifiers #882

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

Merged
merged 1 commit into from
Oct 9, 2019
Merged

Conversation

dcodeIO
Copy link
Member

@dcodeIO dcodeIO commented Oct 2, 2019

Related: #797

This PR extends "Duplicate identifier: X" errors by also printing the range of the already existing identifier. This isn't currently possible for scoped locals (let, const in a block) that use a shared declaration (multiple names share the same local), but works for any var, class member, namespace member etc. Also fixes the assertions triggered previously.

@dcodeIO dcodeIO merged commit 828ce61 into master Oct 9, 2019
willemneal pushed a commit to willemneal/assemblyscript that referenced this pull request Oct 13, 2019
@dcodeIO dcodeIO deleted the related-ranges branch November 8, 2019 01:59
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.

1 participant