commit 11b7c1155aefc83910804d1459516cf47c298eb7
parent 7050dd6360f842963ccfb4858765bb5faa4da337
Author: m21c <ho*******@gmail.com>
Date: Sat, 2 Oct 2021 14:21:32 +0200
added type for deferred type delcaration
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/compiler.c b/compiler.c
@@ -1772,6 +1772,11 @@ defertypedeclaration(Source *source, int key)
source->currenv = source->implicitenv;
decl = makedecl(source, key, DTYPE);
+
+ /* FIXME(m21c): type may be overwritten, when the declaration
+ * is completed */
+ decl->type = maketype(&source->tok.loc, prim + TVOID, NULL);
+ decl->type->module = decl;
source->currenv = savedcurrenv;
return decl;