Implicit parametric polymorphic procedures

This commit is contained in:
Ginger Bill
2017-06-29 20:56:18 +01:00
parent 7e3293fc20
commit 69f7382eec
12 changed files with 271 additions and 91 deletions
+3
View File
@@ -1717,6 +1717,9 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) {
init_type = check_type(c, vd->type, NULL);
if (init_type == NULL) {
init_type = t_invalid;
} else if (is_type_polymorphic(init_type)) {
error(vd->type, "Invalid use of a polymorphic type in variable declaration");
init_type = t_invalid;
}
}