mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-06 18:54:12 +00:00
Update procedure names and extend demo.odin
This commit is contained in:
@@ -45,8 +45,8 @@ Type *check_init_variable(Checker *c, Entity *e, Operand *operand, String contex
|
||||
}
|
||||
t = default_type(t);
|
||||
}
|
||||
if (is_type_gen_proc(t)) {
|
||||
error(e->token, "Invalid use of a generic procedure in %.*s", LIT(context_name));
|
||||
if (is_type_polymorphic(t)) {
|
||||
error(e->token, "Invalid use of a polymorphic type in %.*s", LIT(context_name));
|
||||
e->type = t_invalid;
|
||||
return NULL;
|
||||
}
|
||||
@@ -364,7 +364,7 @@ void check_proc_decl(Checker *c, Entity *e, DeclInfo *d) {
|
||||
}
|
||||
|
||||
|
||||
if (pt->is_generic) {
|
||||
if (pt->is_polymorphic) {
|
||||
if (pl->body == NULL) {
|
||||
error(e->token, "Polymorphic procedures must have a body");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user