aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2021-03-28 22:31:27 +0200
committerRon Evans <[email protected]>2021-03-29 01:04:11 +0200
commit4f6d598ea88f6afe47ceb9611d5e854c522e55b2 (patch)
treecf25d07bf6c7e4384a9f256edadeea7ba8834b69 /testdata
parent16e7dd83a309de207881e529e5f0e72978b05bc1 (diff)
downloadtinygo-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.go1
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()