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 testa
import (
"github.com/tinygo-org/tinygo/testdata/generics/value"
)
func Test() {
v := value.New(1)
vm := value.Map(v, Plus100)
vm.Get(callback, callback)
}
func callback(v int) {
println("value:", v)
}
// Plus100 is a `Transform` that adds 100 to `value`.
func Plus100(value int) int {
return value + 100
}