Add reflect.any_base reflect.any_core

This commit is contained in:
gingerBill
2021-09-25 17:47:23 +01:00
parent e6d8fbf194
commit 931fdd2dca

View File

@@ -157,6 +157,21 @@ typeid_core :: proc(id: typeid) -> typeid {
}
typeid_base_without_enum :: typeid_core
any_base :: proc(v: any) -> any {
v := v
if v != nil {
v.id = typeid_base(v.id)
}
return v
}
any_core :: proc(v: any) -> any {
v := v
if v != nil {
v.id = typeid_core(v.id)
}
return v
}
typeid_elem :: proc(id: typeid) -> typeid {
ti := type_info_of(id)
if ti == nil { return nil }