mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 18:02:02 +00:00
Add reflect.any_base reflect.any_core
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user