mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 14:03:39 +00:00
reflect: add SetZero
This was added in Go 1.20 and is required by encoding/json starting with Go 1.21.
This commit is contained in:
committed by
Ron Evans
parent
e075e0591d
commit
fffad84a63
@@ -1559,8 +1559,6 @@ func TestIsZero(t *testing.T) {
|
||||
t.Errorf("%d: IsZero(Zero(TypeOf((%s)(%+v)))) is false", i, x.Kind(), tt.x)
|
||||
}
|
||||
|
||||
/* // TODO(tinygo): missing SetZero support
|
||||
|
||||
p := New(x.Type()).Elem()
|
||||
p.Set(x)
|
||||
p.SetZero()
|
||||
@@ -1568,7 +1566,6 @@ func TestIsZero(t *testing.T) {
|
||||
t.Errorf("%d: IsZero((%s)(%+v)) is true after SetZero", i, p.Kind(), tt.x)
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user