-
Notifications
You must be signed in to change notification settings - Fork 262
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: division for newtypes in JS and PY #4234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! I was under the impression that real-based newtypes are a recent addition, which is probably why I made the mistake in the first place.
var s0: bv3 := 6 + 3; // 1 | ||
var s1: bv3 := -1; // 7 | ||
var s2: bv3 := 4 + 5 - 2; // 7 | ||
var s3: bv7 := 126 + 3; // 1 | ||
var s4: bv7 := -1; // 127 | ||
var s5: bv7 := 64 + 65 - 2; // 127 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var s0: bv3 := 6 + 3; // 1 | |
var s1: bv3 := -1; // 7 | |
var s2: bv3 := 4 + 5 - 2; // 7 | |
var s3: bv7 := 126 + 3; // 1 | |
var s4: bv7 := -1; // 127 | |
var s5: bv7 := 64 + 65 - 2; // 127 | |
var s0: bv3 := 6 + 3; | |
var s1: bv3 := -1; | |
var s2: bv3 := 4 + 5 - 2; | |
var s3: bv7 := 126 + 3; | |
var s4: bv7 := -1; | |
var s5: bv7 := 64 + 65 - 2; |
Skipping them would be consistent with the other methods.
@@ -0,0 +1 @@ | |||
Select proper division for newtype reals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Select proper division for newtype reals | |
Select proper division for real-based newtypes |
Thanks for the quick review, and for the comments. I'm afraid the web page showed me your comments only after I merged. I'll include them in my next PR (#4235). |
Fixes #4233
This PR corrects the type tests that the JS and PY compilers had done on newtypes.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.