We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7855014 commit 95d0021Copy full SHA for 95d0021
rlp/rlpgen/gen.go
@@ -387,7 +387,10 @@ func (bctx *buildContext) makeNamedBasicOp(named *types.Named) (op, error) {
387
}
388
389
// Cast to basicOp and modify the typ field to use the named type
390
- op := baseOp.(basicOp)
+ op, ok := baseOp.(basicOp)
391
+ if !ok {
392
+ return nil, fmt.Errorf("expected basicOp, got %T", baseOp)
393
+ }
394
op.typ = named // Use the named type as the main type instead of the underlying basic type
395
396
// For decoding, we want to decode as the underlying basic type and convert to named type
0 commit comments