go-ethereum/rlp/rlpgen/testdata
Quentin McGaw 739ba847f6
feat(rlp/rlpgen): support alias types (#154)
## Why this should be merged

To be able to generate RLP code using type aliases (defined e.g. in
`coreth`).
This can and should be PR-ed upstream as well I think.

## How this works

Call `types.Unalias()` at the start of `buildContext.makeOp()`. The
alternative of adding a `case` to the switch statement adds unnecessary
recursive calls while `types.Unalias()` is a no-op if not an alias.

## How this was tested

New `rlpgen` unit test with aliases of well-known types that have
special handling—these make their proper handling easy to spot when
inspecting generated code. A recursive alias in the same test also
demonstrates full alias resolution.

---------

Co-authored-by: Arran Schlosberg <me@arranschlosberg.com>
2025-02-27 11:13:11 +00:00
..
alias.in.txt feat(rlp/rlpgen): support alias types (#154) 2025-02-27 11:13:11 +00:00
alias.out.txt feat(rlp/rlpgen): support alias types (#154) 2025-02-27 11:13:11 +00:00
bigint.in.txt rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
bigint.out.txt [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
nil.in.txt rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
nil.out.txt [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
optional.in.txt rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
optional.out.txt [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
rawvalue.in.txt [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
rawvalue.out.txt [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
uint256.in.txt rlp: support for uint256 (#26898) 2023-03-17 06:51:55 -04:00
uint256.out.txt [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
uints.in.txt rlp/rlpgen: RLP encoder code generator (#24251) 2022-02-16 18:14:12 +01:00
uints.out.txt [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00