From 9460f9f14dd68eb59d36f758272be936300a0440 Mon Sep 17 00:00:00 2001 From: lemon Date: Sun, 7 Aug 2022 17:57:22 +0200 Subject: fix template accessing future environment --- bootstrap/all.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bootstrap/all.h') diff --git a/bootstrap/all.h b/bootstrap/all.h index 5302a07..fb6bfe6 100644 --- a/bootstrap/all.h +++ b/bootstrap/all.h @@ -134,6 +134,8 @@ struct parser { const struct type *targty; bool used_targty; bool is_header; + bool save_envage; + int envage; }; enum typetype { @@ -262,8 +264,10 @@ struct decl { const struct type *ty; } *cache; struct toktree toks; + int envage; } tepl; }; + int age; }; struct teplparam { @@ -528,7 +532,7 @@ bool isnumtype(const struct type *a); const struct type *typeof2(const struct type *a, const struct type *b); /** env.c **/ -struct decl *envfind(const struct env *, const char *name); +struct decl *envfind(const struct env *, int age, const char *name); struct decl *envput(struct env *, const struct decl *decl); struct env *mkenv(const struct env *parent); -- cgit v1.2.3