diff options
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -3,7 +3,11 @@ This file is part of toc. toc is distributed under version 3 of the GNU General Public License, without any warranty whatsoever. You should have received a copy of the GNU General Public License along with toc. If not, see <https://www.gnu.org/licenses/>. */ -static bool types_block(Typer *tr, Block *b); + +enum { + TYPES_BLOCK_NAMESPACE = 0x01 +}; +static bool types_block(Typer *tr, Block *b, U16 flags); static bool types_decl(Typer *tr, Declaration *d); static bool type_resolve(Typer *tr, Type *t, Location where); static bool eval_block(Evaluator *ev, Block *b, Type *t, Value *v); @@ -1461,7 +1465,7 @@ static bool eval_expr(Evaluator *ev, Expression *e, Value *v) { break; } /* make sure function body is typed before calling it */ - if (!types_block(ev->typer, &fn->body)) { + if (!types_block(ev->typer, &fn->body, 0)) { return false; } /* NOTE: we're not calling fn_enter because we're manually entering the function */ |