mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
Set internal linkage and keeping default visibility for anonymous functions
This commit is contained in:
Vendored
+20
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user