diff options
| author | gingerBill <bill@gingerbill.org> | 2019-08-11 23:58:49 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-08-11 23:58:49 +0100 |
| commit | 04036aba9c1eec05fe143d939ef93e017502f015 (patch) | |
| tree | 0d9da264ef729dc01822a6be975cfb8f03fc531f /core/runtime | |
| parent | b08aa857b3c99c241e93ea3d0fbe36f712d96015 (diff) | |
`package reflect`; fix substring type bug; fix scoping rules for `using` on procedure parameter
Diffstat (limited to 'core/runtime')
| -rw-r--r-- | core/runtime/core.odin | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/runtime/core.odin b/core/runtime/core.odin index 28767cc2d..047281b10 100644 --- a/core/runtime/core.odin +++ b/core/runtime/core.odin @@ -283,19 +283,21 @@ type_info_base :: proc "contextless" (info: ^Type_Info) -> ^Type_Info { } -type_info_base_without_enum :: proc "contextless" (info: ^Type_Info) -> ^Type_Info { +type_info_core :: proc "contextless" (info: ^Type_Info) -> ^Type_Info { if info == nil do return nil; base := info; loop: for { switch i in base.variant { - case Type_Info_Named: base = i.base; - case Type_Info_Enum: base = i.base; + case Type_Info_Named: base = i.base; + case Type_Info_Enum: base = i.base; + case Type_Info_Opaque: base = i.elem; case: break loop; } } return base; } +type_info_base_without_enum :: type_info_core; __type_info_of :: proc "contextless" (id: typeid) -> ^Type_Info { data := transmute(Typeid_Bit_Field)id; @@ -311,10 +313,11 @@ typeid_base :: proc "contextless" (id: typeid) -> typeid { ti = type_info_base(ti); return ti.id; } -typeid_base_without_enum :: proc "contextless" (id: typeid) -> typeid { +typeid_core :: proc "contextless" (id: typeid) -> typeid { ti := type_info_base_without_enum(type_info_of(id)); return ti.id; } +typeid_base_without_enum :: typeid_core; |