Skip to content

Make literals an error for tight packing (experimental 0.5.0) #3956

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

Merged
merged 2 commits into from
Apr 20, 2018

Conversation

axic
Copy link
Member

@axic axic commented Apr 20, 2018

Fixes #982.

// ----
// TypeError: (117-118): The type of "int_const 1" was inferred as uint8. This is probably not desired. Use an explicit type.
// Warning: (191-198): "sha3" has been deprecated in favour of "keccak256"
// TypeError: (196-197): The type of "int_const 1" was inferred as uint8. This is probably not desired. Use an explicit type.
Copy link
Contributor

Choose a reason for hiding this comment

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

The message sounds a little weird, especially with these short sentences. What about Cannot perform packed encoding for a literal. Please convert it to an explicit type first.

@axic
Copy link
Member Author

axic commented Apr 20, 2018

@chriseth updated

@axic axic force-pushed the tight-pack-hash branch from f1d7d86 to 069ea38 Compare April 20, 2018 10:58
Copy link
Contributor

@chriseth chriseth left a comment

Choose a reason for hiding this comment

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

We are currently only handling rational number types. I guess the issue is easier for strings, but we should check.

@chriseth
Copy link
Contributor

also things like hex"abcd"

@axic
Copy link
Member Author

axic commented Apr 20, 2018

I'd merge this as is and create a new PR which, if needed, fixes all these for string literals.

@axic axic merged commit 72b0412 into develop Apr 20, 2018
@axic axic deleted the tight-pack-hash branch April 20, 2018 16:32
@axic
Copy link
Member Author

axic commented Apr 20, 2018

@chriseth created an issue to track it: #3962

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