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 interface.functions fragment name conflict with Object prototype keys #2091

Conversation

predetermined
Copy link

Fixes #2054

@ricmoo
Copy link
Member

ricmoo commented Sep 26, 2021

Unfortunately Map is not in older ES3 environments and so it isn’t a candidate for v5. :s

In v6, more modern JavaScript features are being used though, so it will be added then. :)

@predetermined
Copy link
Author

@ricmoo Oh, I haven't thought about this. What do you think about using Object.create(null)?

Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create#custom_and_null_objects

@ricmoo
Copy link
Member

ricmoo commented Sep 27, 2021

Hmmm, that seems scary and I don’t fully understand all the consequences of this, especially in more obscure environments. :s

…can behave in unexpected ways.

also doesn’t inspire me with confidence. :p

I think for v5, I won’t change this and just require fully-qualified signatures (e.g. "prototype()"). In v6 a lot of these things will be operating via Proxy as well, so this is an important test case to remind myself of.

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.

Contracts with toString() functions panic when deployed
2 participants