diff options
author | Ayke van Laethem <[email protected]> | 2021-03-28 22:31:27 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-03-29 01:04:11 +0200 |
commit | 4f6d598ea88f6afe47ceb9611d5e854c522e55b2 (patch) | |
tree | cf25d07bf6c7e4384a9f256edadeea7ba8834b69 /testdata | |
parent | 16e7dd83a309de207881e529e5f0e72978b05bc1 (diff) | |
download | tinygo-4f6d598ea88f6afe47ceb9611d5e854c522e55b2.tar.gz tinygo-4f6d598ea88f6afe47ceb9611d5e854c522e55b2.zip |
reflect: implement Sizeof and Alignof for func values
This is a small change that appears to be necessary for encoding/json
support. It's simple enough to implement.
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/reflect.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testdata/reflect.go b/testdata/reflect.go index 2ddbe8dd7..b02dd6c80 100644 --- a/testdata/reflect.go +++ b/testdata/reflect.go @@ -148,6 +148,7 @@ func main() { assertSize(reflect.TypeOf(uintptr(0)).Size() == unsafe.Sizeof(uintptr(0)), "uintptr") assertSize(reflect.TypeOf("").Size() == unsafe.Sizeof(""), "string") assertSize(reflect.TypeOf(new(int)).Size() == unsafe.Sizeof(new(int)), "*int") + assertSize(reflect.TypeOf(zeroFunc).Size() == unsafe.Sizeof(zeroFunc), "func()") // SetBool rv := reflect.ValueOf(new(bool)).Elem() |