aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 1fa0117ac..43d870261 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -5865,6 +5865,12 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t
check_close_scope(c);
return kind;
}
+
+ if (pl->body == NULL) {
+ error(node, "A procedure literal must have a body");
+ return kind;
+ }
+
check_procedure_later(c, c->curr_ast_file, empty_token, decl, type, pl->body, pl->tags);
}
check_close_scope(c);