mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-04 22:58:46 +00:00
Remove derived from context; Fix parsing issue for typeid specializations in record parameters; Fix runtime printing of types
This commit is contained in:
@@ -1528,6 +1528,8 @@ parse_field_list :: proc(p: ^Parser, follow: token.Kind, allowed_flags: ast.Fiel
|
||||
return ok;
|
||||
}
|
||||
|
||||
is_signature := (allowed_flags & Field_Flags_Signature_Params) == Field_Flags_Signature_Params;
|
||||
|
||||
any_polymorphic_names := check_procedure_name_list(p, names);
|
||||
set_flags = check_field_flag_prefixes(p, len(names), allowed_flags, set_flags);
|
||||
|
||||
@@ -1538,7 +1540,7 @@ parse_field_list :: proc(p: ^Parser, follow: token.Kind, allowed_flags: ast.Fiel
|
||||
if p.curr_tok.kind != token.Eq {
|
||||
type = parse_var_type(p, allowed_flags);
|
||||
tt := ast.unparen_expr(type);
|
||||
if !any_polymorphic_names {
|
||||
if is_signature && !any_polymorphic_names {
|
||||
if ti, ok := tt.derived.(ast.Typeid_Type); ok && ti.specialization != nil {
|
||||
error(p, tt.pos, "specialization of typeid is not allowed without polymorphic names");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user