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

Generated JS may conflict with JS default types #21

Open
mateusfccp opened this issue Jul 29, 2024 · 0 comments
Open

Generated JS may conflict with JS default types #21

mateusfccp opened this issue Jul 29, 2024 · 0 comments

Comments

@mateusfccp
Copy link

For instance, if I define a String object in kind (as in the stdlib), the compiled JS will generate a const String = ....

This overrides the default String object. If you are dealing with Kind2-only scripts or you don't use any method of String, it's not a problem. However, if you want to use your Kind2 generated script with anything else (like another third-party library that probably uses String), you will get an error.

Example:
image

A solution would be to generate namespaced and/or obfuscated symbols so that the conflict does not happen.

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

No branches or pull requests

1 participant