diff options
-rw-r--r-- | src/tuplr.hpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tuplr.hpp b/src/tuplr.hpp index a99760e..f69252a 100644 --- a/src/tuplr.hpp +++ b/src/tuplr.hpp @@ -542,9 +542,7 @@ inline ostream& operator<<(ostream& out, const Constraints& c) { struct TEnv : public Env< const ASymbol*, pair<AST*, AType*> > { TEnv(PEnv& p) : penv(p), varID(1) {} AType* fresh(const ASymbol* sym) { - AType* ret = new AType(sym->loc, varID++); - def(sym, make_pair((AST*)NULL, ret)); - return ret; + return def(sym, make_pair((AST*)NULL, new AType(sym->loc, varID++))).second; } AType* var(const AST* ast=0) { const ASymbol* sym = ast->to<const ASymbol*>(); |