diff options
Diffstat (limited to 'src/unify.cpp')
-rw-r--r-- | src/unify.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/unify.cpp b/src/unify.cpp index 2a8e6a0..91d6fde 100644 --- a/src/unify.cpp +++ b/src/unify.cpp @@ -22,6 +22,13 @@ * Type Inference/Substitution * ***************************************************************************/ +void +Constraints::constrain(TEnv& tenv, const AST* o, AType* t) +{ + assert(!o->to<const AType*>()); + push_back(Constraint(tenv.var(o), t, o->loc)); +} + static void substitute(ATuple* tup, const AST* from, AST* to) { |