Basic polymorphic named procedure parameters for procedures and records

This commit is contained in:
gingerBill
2020-04-13 15:48:56 +01:00
parent f09b6a4c90
commit f229084baa
9 changed files with 165 additions and 44 deletions

View File

@@ -885,6 +885,7 @@ void destroy_checker(Checker *c) {
Entity *entity_of_ident(Ast *identifier) {
identifier = unparen_expr(identifier);
if (identifier->kind == Ast_Ident) {
return identifier->Ident.entity;
}
@@ -1042,6 +1043,8 @@ void add_type_and_value(CheckerInfo *i, Ast *expr, AddressingMode mode, Type *ty
expr->tav.value = value;
} else if (mode == Addressing_Value && is_type_typeid(type)) {
expr->tav.value = value;
} else if (mode == Addressing_Value && is_type_proc(type)) {
expr->tav.value = value;
}
prev_expr = expr;