-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
Roc does not detect type mismatch error when performing math on values defined in separate file #6682
Labels
bug
Something isn't working
Comments
4 ways to define a value == 3 failure modes + 1 successNote that behavior varies wildly depending on how and where the value is defined. I have identified 4 different distinct failure modes:
|
imclerran
changed the title
Roc does not correctly detect integer overflow error when performing math on constants defined in separate file
Roc does not detect integer overflow error when performing math on constants defined in separate file
Apr 26, 2024
imclerran
changed the title
Roc does not detect integer overflow error when performing math on constants defined in separate file
Roc does not detect type mismatch error when performing math on constants defined in separate file
Apr 29, 2024
imclerran
changed the title
Roc does not detect type mismatch error when performing math on constants defined in separate file
Roc does not detect type mismatch error when performing math on values defined in separate file
Apr 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Crash message:
OR:
(Min repro for both below)
Expected behavior
Preferred behavior:
Alternative acceptable behavior:
Description of error case
To reproduce, the following criteria must be met:
The constant must be derived from another constantThe failure mode will vary depending on whether the constant is defined by a literal, or based on another another constant.Int *
Int *
Int *
Note that point 5 means that if you do
instStar + constant
, where intStar holds 1u8, and constant == 255, Roc will crash with an integer overflow error. However, if constant == 256, it will trigger theHit an erroneous type when creating a layout for '4.IdentId(21)'
error described here.Minimum reproduction
The text was updated successfully, but these errors were encountered: