-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1975 from web3j/nicks/issue-1773
Fixed java reserved words codegen errors
- Loading branch information
Showing
7 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
15 changes: 15 additions & 0 deletions
15
codegen/src/test/resources/solidity/javareservedwords/JavaReservedWords.sol
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
contract JavaReservedWords { | ||
|
||
string public goto; | ||
|
||
struct extends { | ||
uint class; | ||
} | ||
|
||
function void(extends calldata protected) external pure returns (uint) { | ||
return protected.class; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
codegen/src/test/resources/solidity/javareservedwords/build/JavaReservedWords.abi
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"inputs":[],"name":"goto","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"class","type":"uint256"}],"internalType":"struct JavaReservedWords.extends","name":"protected","type":"tuple"}],"name":"void","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}] |
1 change: 1 addition & 0 deletions
1
codegen/src/test/resources/solidity/javareservedwords/build/JavaReservedWords.bin
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
608060405234801561001057600080fd5b506102f7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634f9f14921461003b578063c82ef2191461006b575b600080fd5b6100556004803603810190610050919061014e565b610089565b6040516100629190610194565b60405180910390f35b610073610097565b604051610080919061023f565b60405180910390f35b600081600001359050919050565b600080546100a490610290565b80601f01602080910402602001604051908101604052809291908181526020018280546100d090610290565b801561011d5780601f106100f25761010080835404028352916020019161011d565b820191906000526020600020905b81548152906001019060200180831161010057829003601f168201915b505050505081565b600080fd5b600080fd5b6000602082840312156101455761014461012a565b5b81905092915050565b60006020828403121561016457610163610125565b5b60006101728482850161012f565b91505092915050565b6000819050919050565b61018e8161017b565b82525050565b60006020820190506101a96000830184610185565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156101e95780820151818401526020810190506101ce565b60008484015250505050565b6000601f19601f8301169050919050565b6000610211826101af565b61021b81856101ba565b935061022b8185602086016101cb565b610234816101f5565b840191505092915050565b600060208201905081810360008301526102598184610206565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806102a857607f821691505b6020821081036102bb576102ba610261565b5b5091905056fea2646970667358221220362294dad2b9d49b00406366bbec2361741b4ccb8917e718b625160087de448464736f6c63430008120033 |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
608060405234801561001057600080fd5b506102f7806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80634f9f14921461003b578063c82ef2191461006b575b600080fd5b6100556004803603810190610050919061014e565b610089565b6040516100629190610194565b60405180910390f35b610073610097565b604051610080919061023f565b60405180910390f35b600081600001359050919050565b600080546100a490610290565b80601f01602080910402602001604051908101604052809291908181526020018280546100d090610290565b801561011d5780601f106100f25761010080835404028352916020019161011d565b820191906000526020600020905b81548152906001019060200180831161010057829003601f168201915b505050505081565b600080fd5b600080fd5b6000602082840312156101455761014461012a565b5b81905092915050565b60006020828403121561016457610163610125565b5b60006101728482850161012f565b91505092915050565b6000819050919050565b61018e8161017b565b82525050565b60006020820190506101a96000830184610185565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156101e95780820151818401526020810190506101ce565b60008484015250505050565b6000601f19601f8301169050919050565b6000610211826101af565b61021b81856101ba565b935061022b8185602086016101cb565b610234816101f5565b840191505092915050565b600060208201905081810360008301526102598184610206565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806102a857607f821691505b6020821081036102bb576102ba610261565b5b5091905056fea2646970667358221220362294dad2b9d49b00406366bbec2361741b4ccb8917e718b625160087de448464736f6c63430008120033 |