diff options
Diffstat (limited to 'src/resp.hpp')
-rw-r--r-- | src/resp.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resp.hpp b/src/resp.hpp index 6a40729..35edf31 100644 --- a/src/resp.hpp +++ b/src/resp.hpp @@ -438,6 +438,10 @@ struct AType : public ATuple { AType(Cursor c, AST* ast, va_list args) : ATuple(c, ast, args), kind(EXPR), id(0) { tag(T_TYPE); } AType(const AST* first, const AST* rest, Cursor c) : ATuple(first, rest, c), kind(EXPR), id(0) { tag(T_TYPE); } AType(const AType& copy) : ATuple(copy), kind(copy.kind), id(copy.id) { tag(T_TYPE); } + AType(const AType& copy, Cursor cur) : ATuple(copy), kind(copy.kind), id(copy.id) { + tag(T_TYPE); + loc = cur; + } bool concrete() const { switch (kind) { @@ -703,6 +707,7 @@ struct TEnv : public Env<const ASymbol*, const AType*> { if (!ast) return new AType(Cursor(), varID++); + assert(!ast->to_type()); Vars::iterator v = vars.find(ast); if (v != vars.end()) return v->second; |