FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Unsigned integers no wrap II by ubaidsk · Pull Request #2189 · lcompilers/lpython · GitHub

Unsigned integers no wrap II - #2189

Merged
ubaidsk merged 8 commits into
lcompilers:mainfrom
ubaidsk:unsigned_ints
Jul 19, 2023
Merged

Unsigned integers no wrap II#2189
ubaidsk merged 8 commits into
lcompilers:mainfrom
ubaidsk:unsigned_ints

Conversation

ubaidsk commented Jul 19, 2023
edited
Loading

Copy link
Copy Markdown
Collaborator

fixes #2173

towards #2176 (comment)

--> tests/errors/unsigned_02.py:3:10
|
3 | i: u16 = -u16(5)
| ^^^^^^^ use -i32(u) for signed result

certik Jul 19, 2023
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It would be great if it could copy the actual expression inside:

Suggested change
| ^^^^^^^ use -i32(u) for signed result
| ^^^^^^^ use -i32(5) for signed result

But I guess for that we would have to have an ASR -> Python printer, which we plan to, but not right now. So we can do that later.

certik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks great!

ubaidsk commented Jul 19, 2023

Copy link
Copy Markdown
Collaborator Author

Thank you so much for the quick review!

ubaidsk enabled auto-merge July 19, 2023 19:11
ubaidsk merged commit 0001e55 into lcompilers:main Jul 19, 2023
ubaidsk deleted the unsigned_ints branch July 19, 2023 23:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

In emulation mode, u8-u64 should be represented by just int

2 participants


Back | FazBrowse Home | New Git URL