-
Notifications
You must be signed in to change notification settings - Fork 32
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
Resolve #99: Fix abigen with int expression template arguments #100
Resolve #99: Fix abigen with int expression template arguments #100
Conversation
471ac19
to
255eca1
Compare
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.
Small style request, otherwise LGTM.
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. please add a test to tests/abigen-pass
directory. look at other examples, there are small *.json, *.abi and *.cpp to demonstrate how this works
Good call. Added a test which fails before the fix, and passes after. |
In my contracts, I use several template arguments which are expressions which resolve to integral values (such as an eosio::name) but are not literal integer values. This works great in my contracts, but causes abigen to fail. Fix abigen in cases where a template argument is an expression that resolves to an integer, but isn't an integer literal.
Add braces Co-authored-by: Scott B <[email protected]>
This test fails without the fix to issue AntelopeIO#99, and passes with it. The failure is a bit odd -- it doesn't fail because cdt-cpp crashes; rather, it fails because the crashed cdt-cpp did not output an abi file and therefore it cannot match the golden record... But hey, it does test the issue, just rather indirectly. =)
53fefe5
to
8dfff37
Compare
Change Description
Resolve #99
In my contracts, I use several template arguments which are expressions which resolve to integral values (such as an
eosio::name
) but are not literal integer values. This works great in my contracts, but causes abigen to fail.This PReq fixes abigen in such cases where a template argument is an expression that resolves to an integer, but isn't an integer literal.
API Changes
Documentation Additions