Add $T: typeid/[]$E; Deprecate T: type/[]$E

`type` as a keyword will soon be removed in favour of polymorphic names (identifiers) in procedures
This commit is contained in:
gingerBill
2018-09-02 16:33:54 +01:00
parent 220485a2d2
commit 11f5236434
6 changed files with 101 additions and 27 deletions
+1 -1
View File
@@ -767,7 +767,7 @@ enum_value_to_string :: proc(v: any) -> (string, bool) {
return "", false;
}
string_to_enum_value :: proc(T: type, s: string) -> (T, bool) {
string_to_enum_value :: proc($T: typeid, s: string) -> (T, bool) {
ti := type_info_base(type_info_of(T));
if e, ok := ti.variant.(Type_Info_Enum); ok {
for str, idx in e.names {