diff options
author | Damian Gryski <[email protected]> | 2023-04-01 11:12:16 -0700 |
---|---|---|
committer | Ayke <[email protected]> | 2023-04-01 22:46:46 +0200 |
commit | a85cb2219392c06e8809cc1b526ad0e145ea1dad (patch) | |
tree | 2e904dae15890029e132a1aadb3745c06a8192a2 /src/reflect | |
parent | 60bb832c894c4e62b22dd126c9bd5dc776443c05 (diff) | |
download | tinygo-a85cb2219392c06e8809cc1b526ad0e145ea1dad.tar.gz tinygo-a85cb2219392c06e8809cc1b526ad0e145ea1dad.zip |
reflect: uncomment TestAppend and fix a bug it found
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/all_test.go | 4 | ||||
-rw-r--r-- | src/reflect/value.go | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/reflect/all_test.go b/src/reflect/all_test.go index 95a0a1007..8988d1278 100644 --- a/src/reflect/all_test.go +++ b/src/reflect/all_test.go @@ -874,8 +874,6 @@ var appendTests = []struct { {make([]int, 2, 4), []int{22, 33, 44}}, } -/* - func TestAppend(t *testing.T) { for i, test := range appendTests { origLen, extraLen := len(test.orig), len(test.extra) @@ -935,8 +933,6 @@ func TestAppend(t *testing.T) { } } -*/ - func TestCopy(t *testing.T) { a := []int{1, 2, 3, 4, 10, 9, 8, 7} b := []int{11, 22, 33, 44, 1010, 99, 88, 77, 66, 55, 44} diff --git a/src/reflect/value.go b/src/reflect/value.go index 51c69cd5f..bd8c1476a 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -1666,6 +1666,7 @@ func (v *Value) extendSlice(n int) { cap: ncap, } + v.flags = valueFlagExported v.value = (unsafe.Pointer)(&newslice) } |