aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-29 11:25:05 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-29 11:25:05 +0100
commitf4879d472360984f2868c406be96a4f3b473bfa4 (patch)
treeca038f5fcfad43b3d1954526b9f69bdfa080d289 /src/check_decl.cpp
parentfd81c06c35f1cca9153be9f78dc5ecc4ae503d0e (diff)
Update procedure names and extend demo.odin
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index fa1a494dd..2cb95949c 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -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");
}