mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-03 10:37:46 +00:00
f0904779a5
This is the beginning of true reflection support in TinyGo.
13 lines
271 B
Go
13 lines
271 B
Go
package main
|
|
|
|
import "reflect"
|
|
|
|
type myint int
|
|
|
|
func main() {
|
|
println("matching types")
|
|
println(reflect.TypeOf(int(3)) == reflect.TypeOf(int(5)))
|
|
println(reflect.TypeOf(int(3)) == reflect.TypeOf(uint(5)))
|
|
println(reflect.TypeOf(myint(3)) == reflect.TypeOf(int(5)))
|
|
}
|