Set internal linkage and keeping default visibility for anonymous functions

This commit is contained in:
Phil Kedy
2022-07-28 10:34:27 -04:00
committed by Ron Evans
parent 25c8d3ec3a
commit 05cdde162c
10 changed files with 123 additions and 9 deletions
+20
View File
@@ -0,0 +1,20 @@
package testb
import (
"github.com/tinygo-org/tinygo/testdata/generics/value"
)
func Test() {
v := value.New(1)
vm := value.Map(v, Plus500)
vm.Get(callback, callback)
}
func callback(v int) {
println("value:", v)
}
// Plus500 is a `Transform` that adds 500 to `value`.
func Plus500(value int) int {
return value + 500
}