summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-12-29 10:00:38 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2019-12-29 10:00:38 -0500
commit65a7e6270d5c97ac01f02a7d16d016eb6f526d51 (patch)
tree5be98e81a0402f45979324d6c7ab675ec2c64d80
parent5c23113aa2631bd4d1ef71c4964bf32f7daf1010 (diff)
fixed the bug
-rw-r--r--binfile.c2
-rw-r--r--test.toc2
-rw-r--r--types.c1
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(){})(); */