mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
reflect: handle Convert'ing between identical underlying types
Needed for go-jose/v3
This commit is contained in:
@@ -587,6 +587,12 @@ func TestConvert(t *testing.T) {
|
||||
t.Errorf("Convert(string -> []byte")
|
||||
}
|
||||
|
||||
type namedString string
|
||||
|
||||
c = v.Convert(TypeOf(namedString("")))
|
||||
if c.Type().Kind() != String || c.Type().Name() != "namedString" {
|
||||
t.Errorf("Convert(string -> namedString")
|
||||
}
|
||||
}
|
||||
|
||||
func equal[T comparable](a, b []T) bool {
|
||||
|
||||
Reference in New Issue
Block a user