-
Notifications
You must be signed in to change notification settings - Fork 355
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(gnovm): correct type for shift expression #1775
base: master
Are you sure you want to change the base?
Conversation
…terface_comparison
Hi @thehowl , this one is good to review too. |
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.
Nice work. I think there are a few things that need fixing. I appreciate all of the tests. The Go spec has a some nice cases that maybe we could also include as part of the tests: https://arc.net/l/quote/offplfsv
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.
Looks good to me. Thanks for quickly addressing my comments 🙏
@@ -7,4 +7,4 @@ func main() { | |||
} | |||
|
|||
// Error: | |||
// main/files/types/shift_a11.gno:3:1: cannot convert StringKind to UintKind | |||
// main/files/types/shift_a11.gno:5:7: invalid operation: invalid shift count: (const ("hello" <untyped> string)) |
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.
the original error message seems correct.
@@ -6,4 +6,4 @@ func main() { | |||
} | |||
|
|||
// Error: | |||
// main/files/types/shift_a7.gno:3:1: cannot convert StringKind to UintKind | |||
// main/files/types/shift_a7.gno:5:10: invalid operation: invalid shift count: (const ("a" <untyped> string)) |
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.
the original error message seems correct
UPDATE: this one is ready for review.
shift operator where first operand is an untyped bigint always results in a bigint is not resolved by #1426, it's fixed by this one.
=================================================================