mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 05:23:40 +00:00
reflect: implement Value.Grow
This was added in Go 1.20 and becomes necessary for encoding/json in Go 1.21.
This commit is contained in:
committed by
Ron Evans
parent
9126b95737
commit
e98dfd6c46
@@ -790,6 +790,8 @@ func TestFunctionValue(t *testing.T) {
|
||||
assert(t, v.Type().String(), "func()")
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
func TestGrow(t *testing.T) {
|
||||
v := ValueOf([]int(nil))
|
||||
shouldPanic("reflect.Value.Grow using unaddressable value", func() { v.Grow(0) })
|
||||
@@ -857,8 +859,6 @@ func TestGrow(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
var appendTests = []struct {
|
||||
orig, extra []int
|
||||
}{
|
||||
|
||||
Reference in New Issue
Block a user