summaryrefslogtreecommitdiff
path: root/parse/type.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-01-02 23:19:37 -0800
committerOri Bernstein <ori@eigenstate.org>2016-01-02 23:19:37 -0800
commite74148eb539e0809131fe837c2d123b0c295f9ce (patch)
treeebe3ad4bb86e5dc762dfe31d8f1c4dc13a0fabbd /parse/type.c
parentf9d4d377fbc039e674b51986b8cbb1486e8eada5 (diff)
downloadmc-e74148eb539e0809131fe837c2d123b0c295f9ce.tar.gz
Correctly check for decls without initializers.
This turns them into errors. Also fixes a couple that slipped into the code.
Diffstat (limited to 'parse/type.c')
-rw-r--r--parse/type.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse/type.c b/parse/type.c
index 99d228a..3683b58 100644
--- a/parse/type.c
+++ b/parse/type.c
@@ -854,6 +854,7 @@ void iterableinit(Stab *st, Trait *tr)
func->decl.isgeneric = 1;
func->decl.isconst = 1;
func->decl.isglobl = 1;
+ func->decl.isextern = 1;
lappend(&tr->funcs, &tr->nfuncs, func);
putdcl(st, func);
@@ -873,6 +874,7 @@ void iterableinit(Stab *st, Trait *tr)
func->decl.isgeneric = 1;
func->decl.isconst = 1;
func->decl.isglobl = 1;
+ func->decl.isextern = 1;
lappend(&tr->funcs, &tr->nfuncs, func);
putdcl(st, func);