go-ethereum/rlp/rlpgen/testdata/named.libevm.in.txt
Ceyhun Onur 9ed36b613a
feat: Add support for named types with underlying basic types (#236)
## Why this should be merged

The current rlpgen partially supports named types with basic underlying,
and it generates the rlp without correct conversion i.e:
`w.WriteUint64(obj.Uint64NewT)`

This PR adds the full support it

## How this works

Adds check for `isNamedWithBasicUnderlying` and then returns a `op` with
`makeNamedBasicOp` which is basically a `basicOp` but with the `typ`
refers to the named type so that it can correctly encode decode with the
named type.

## How this was tested

Added UT tests

---------

Signed-off-by: Ceyhun Onur <ceyhunonur54@gmail.com>
2025-10-08 08:07:57 +01:00

15 lines
186 B
Go

// -*- mode: go -*-
package test
type (
BoolT bool
Uint64T uint64
StringT string
)
type Test struct {
BoolNewT BoolT
Uint64NewT Uint64T
StringNewT StringT
}