From 65a7e6270d5c97ac01f02a7d16d016eb6f526d51 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Sun, 29 Dec 2019 10:00:38 -0500 Subject: fixed the bug --- binfile.c | 2 +- test.toc | 2 +- types.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/binfile.c b/binfile.c index a1e8269..11ebf9d 100644 --- a/binfile.c +++ b/binfile.c @@ -1,4 +1,4 @@ -#define BINFILE_PORTABLE 1 +/* #define BINFILE_PORTABLE 1 */ static inline void write_u8(FILE *fp, U8 u8) { putc(u8, fp); diff --git a/test.toc b/test.toc index 1c2de62..9931d47 100644 --- a/test.toc +++ b/test.toc @@ -1,2 +1,2 @@ #export foo :: f64 = 0.07321; -asdf, dsajkhf, sadjkfh ::= 5; +// asdf, dsajkhf, sadjkfh ::= 5; 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(){})(); */ -- cgit v1.2.3