tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

allow read private fileld for Interface Method in reflect.Value

Open hunjixin opened this issue 3 years ago • 2 comments

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

hunjixin avatar Jul 29 '22 05:07 hunjixin

https://github.com/tinygo-org/tinygo/issues/2983

hunjixin avatar Aug 10 '22 05:08 hunjixin

Thank you for the bug report! I have found and fixed the issue here: https://github.com/tinygo-org/tinygo/pull/3111

aykevl avatar Aug 31 '22 20:08 aykevl

Released as part of v0.26.0

deadprogram avatar Sep 30 '22 06:09 deadprogram