From 5ca01630edc38087b722e1c22b20edc82d871dd7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 4 Dec 2010 23:48:39 +0000 Subject: Tidy up unify.cpp git-svn-id: http://svn.drobilla.net/resp/resp@298 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/resp.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/resp.hpp') 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 { if (!ast) return new AType(Cursor(), varID++); + assert(!ast->to_type()); Vars::iterator v = vars.find(ast); if (v != vars.end()) return v->second; -- cgit v1.2.1