projects
/
gwion.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b01456a
)
:art: Check inferabity of base type
author
Jérémie Astor
<astor.jeremie@wanadoo.fr>
Sun, 10 May 2020 23:31:45 +0000
(
01:31
+0200)
committer
Jérémie Astor
<astor.jeremie@wanadoo.fr>
Sun, 10 May 2020 23:31:45 +0000
(
01:31
+0200)
src/parse/check.c
patch
|
blob
|
history
diff --git
a/src/parse/check.c
b/src/parse/check.c
index 56fbd6463a8b93a872ddfcd4e12823b1d1e1efef..d51081d39a09bbdde3ef404b611d6b1de3accec9 100644
(file)
--- a/
src/parse/check.c
+++ b/
src/parse/check.c
@@
-159,13
+159,13
@@
ANN Type check_exp_decl(const Env env, const Exp_Decl* decl) {
clear_decl(env, decl);
CHECK_BO(scan1_exp(env, exp_self(decl)))
CHECK_BO(scan2_exp(env, exp_self(decl)))
- if(GET_FLAG(decl->type, infer))
- ERR_O(td_pos(decl->td), _("can't infer type."));
}
if(!decl->type)
ERR_O(td_pos(decl->td), _("can't find type"));
{
const Type t = get_type(decl->type);
+ if(GET_FLAG(t, infer))
+ ERR_O(td_pos(decl->td), _("can't infer type."));
if(!GET_FLAG(t, check) && t->e->def)
CHECK_BO(ensure_check(env, t))
}