goose
goose copied to clipboard
Integer conversion of len is mistranslated
Converting len
to uint32
via a type wrapper is mistranslated, dropping the type wrapper and using slice.len
(which produces a u64
).
type Uint32 uint32
func failing_testU32NewtypeLen() bool {
s := make([]byte, 20)
return Uint32(len(s)) == Uint32(20)
}
The translation omits the Uint32
conversion altogether.
A workaround is to use Uint32(uint32(len(s)))
, so that the uint32
conversion shows up syntactically.