mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 14:03:39 +00:00
reflect: add reflect.TypeOf
This is the beginning of true reflection support in TinyGo.
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
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)))
|
||||
}
|
||||
Reference in New Issue
Block a user