tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

IsExported undefined (type reflect.Method has no field or method IsExported)

Open danielvladco opened this issue 1 year ago • 0 comments

Hello, thanks for your amazing work on tinygo!

I am facing an issue accessing IsExported method from the reflect package

Minimal steps to reproduce:

  1. Write this program:
package main

import (
	"reflect"
)

func main() {
	if reflect.TypeOf(0).Method(0).IsExported() {
		println("IsExported exists")
	}
}
  1. Run tinygo build .

Expected result

To compile and build

Actual result

Error:

main.go:8:33: reflect.TypeOf(0).Method(0).IsExported undefined (type reflect.Method has no field or method IsExported)

danielvladco avatar Nov 09 '23 10:11 danielvladco