Skip to content
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 issue #235 (Negative Binary Literals are Positive) #238

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

cheqianh
Copy link
Contributor

@cheqianh cheqianh commented Apr 28, 2021

Issue summary:

Issue #235: Negative binary literals are read as its positive magnitude, e.g. -0b100 read as 4 instead of -4.

The root of the issue is because we didn't change 'sign' when we detects negative binary number.

Test:
Screen Shot 2021-04-27 at 5 47 21 PM

Also worked for below two files:

"ion-tests/iontestdata/good/equivs/binaryInts.ion",
"ion-tests/iontestdata/good/equivs/intsWithUnderscores.ion",

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@cheqianh cheqianh requested review from tgregg and almann April 28, 2021 00:56
Copy link
Contributor

@almann almann left a comment

Choose a reason for hiding this comment

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

🛳️⛴️🛥️🚢

@cheqianh cheqianh merged commit a52407c into amazon-ion:master Apr 28, 2021
@cheqianh cheqianh deleted the issue#235 branch April 28, 2021 02:24
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.

2 participants