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

Const & enum deep comparison is not strictly typed #517

Closed
erayd opened this issue May 23, 2018 · 3 comments
Closed

Const & enum deep comparison is not strictly typed #517

erayd opened this issue May 23, 2018 · 3 comments

Comments

@erayd
Copy link
Contributor

erayd commented May 23, 2018

The const implementation from #507, and the existing enum implementation, does not properly compare objects. Objects are compared in a loosely-typed manner (==), which also results in a loosely-typed comparison of all members.

This behavior is incorrect, and results in spec violations. For example, "string" == true returns true, despite being clearly invalid - both the type and content are completely different.

@shmax
Copy link
Collaborator

shmax commented May 23, 2018

Would you like me to take a crack at this? I feel like you need some video game time...

@erayd
Copy link
Contributor Author

erayd commented May 24, 2018

Please! I'm flat out right now...

@shmax
Copy link
Collaborator

shmax commented May 24, 2018

Righto, then. I have some time on Sunday.

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

2 participants