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

Variable called $ allowed by compiler and produces invalid output #3272

Closed
Conduitry opened this issue Jul 20, 2019 · 0 comments · Fixed by #3348
Closed

Variable called $ allowed by compiler and produces invalid output #3272

Conduitry opened this issue Jul 20, 2019 · 0 comments · Fixed by #3348
Labels

Comments

@Conduitry
Copy link
Member

<script>
	$;
</script>

Variables called simply $ are currently allowed and are assumed to be subscriptions to a variable with the empty string as the name, which results in syntactically incorrect output. The simplest solution would probably be to disallow this at parse time.

@Conduitry Conduitry added the bug label Jul 20, 2019
Rich-Harris added a commit that referenced this issue Aug 4, 2019
throw error if $ is referenced as global
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant