summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/types.c b/types.c
index 202fe3f..4fcf54c 100644
--- a/types.c
+++ b/types.c
@@ -1956,6 +1956,7 @@ static bool types_decl(Typer *tr, Declaration *d) {
success = false;
goto ret;
}
+ d->expr.type = d->type;
} else {
if (d->expr.type.kind == TYPE_VOID) {
/* e.g. x := (fn(){})(); */