diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-28 23:17:20 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-28 23:17:20 +0100 |
| commit | 0622509807993e02ab9ed155f1864198fd180bf9 (patch) | |
| tree | b6a7e0868565ac26aebf8f841b5c9e48f7a7aead /src/check_expr.cpp | |
| parent | 9ca2246bac823022f39d495398456bcb142d50b9 (diff) | |
Disable `var` and `const` declarations
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 10bfa1233..896905020 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -2219,6 +2219,11 @@ Type *check_type(Checker *c, AstNode *e, Type *named_type) { } } + if (is_type_gen_proc(type)) { + error(e, "Invalid use of polymorphic procedure type"); + type = t_invalid; + } + if (is_type_typed(type)) { add_type_and_value(&c->info, e, Addressing_Type, type, empty_exact_value); } else { |