aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2017-12-03 23:03:40 +0000
committergingerBill <bill@gingerbill.org>2017-12-03 23:03:40 +0000
commit596a2c835554a26cb0ad1f83892a3a11c04bad25 (patch)
tree432c9cbf862d33c840c8664a4f31587e142cfc35 /src/checker.cpp
parent9f52b2c2834a3a7248784492a3ede3a8a9063f6a (diff)
Procedure grouping `foo :: proc[foo16, foo32];`
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 2bdf72f79..41faba7c0 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -2259,6 +2259,13 @@ void check_collect_value_decl(Checker *c, AstNode *decl) {
}
d->proc_lit = init;
d->type_expr = pl->type;
+ } else if (init->kind == AstNode_ProcGrouping) {
+ ast_node(pg, ProcGrouping, init);
+ e = make_entity_procedure_grouping(c->allocator, d->scope, token, nullptr);
+ if (fl != nullptr) {
+ error(name, "Procedure groupings are not allowed within a foreign block");
+ }
+ d->init_expr = init;
} else {
e = make_entity_constant(c->allocator, d->scope, token, nullptr, empty_exact_value);
d->type_expr = vd->type;