summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types.c b/types.c
index fc877af..a008832 100644
--- a/types.c
+++ b/types.c
@@ -2263,7 +2263,7 @@ static Status types_expr(Typer *tr, Expression *e) {
expr->kind = EXPR_VAL;
expr->flags = EXPR_FOUND_TYPE;
expr->val = arg_val;
- param_decl->expr = *expr;
+ param_decl->expr = *expr; /* this is so that an error occurs if the type of expr doesn't match param_decl->type (we can't check here because param_decl->type isn't resolved yet) */
param_decl->flags |= DECL_FOUND_VAL|DECL_HAS_EXPR;
copy_val(tr->allocr, &param_decl->val, arg_val, type);
if (!(param_decl->flags & DECL_ANNOTATES_TYPE)) {