mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-11 23:44:27 +00:00
## 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>
15 lines
186 B
Go
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
|
|
}
|