Skip to content

Binary function lor works incorrectly with variants cast to int #7036

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

Closed
DZakh opened this issue Sep 14, 2024 · 0 comments
Closed

Binary function lor works incorrectly with variants cast to int #7036

DZakh opened this issue Sep 14, 2024 · 0 comments
Assignees

Comments

@DZakh
Copy link
Member

DZakh commented Sep 14, 2024

https://rescript-lang.org/try?version=v11.1.4&code=C4TwDgpgBAZgNgQwOZQLxQD5QAIIM4AUADAJRQCCmO+BATGQEIBQTAUngHRwD2SBBDKAC4AfFACWAO2AkSbTjz5EAtCJ4AnOrPldexVRv6DRE6bLntdSg900NVAeQBGAKw4BbZOIDG2y4v01WwIAUnUEAHcCAANaaPMmIA

type flag = | @as(0) A | @as(2) B

Js.log(0->lor((B :> int))) // Results with 1 instead of 2
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