tinygo
tinygo copied to clipboard
allow read private fileld for Interface Method in reflect.Value
reproducer code
package main
import (
"fmt"
"reflect"
)
type A struct {
a string
}
func main() {
v := reflect.ValueOf(A{"xxxx"})
fmt.Println(v.Interface())
}
go run main.go {xxxx} tinygo run main.go panic: (reflect.Value).Interface: unexported error: failed to run compiled binary /var/folders/_v/lltqd75s3tsdpkr65klgzwch0000gn/T/tinygo891702810/main: signal: abort
https://github.com/tinygo-org/tinygo/issues/2983
Thank you for the bug report! I have found and fixed the issue here: https://github.com/tinygo-org/tinygo/pull/3111
Released as part of v0.26.0