diff options
-rw-r--r-- | ll.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -786,16 +786,13 @@ ASTIf::compile(CEnv& cenv) void ASTClosure::lift(CEnv& cenv) { - assert(!func); - // Can't lift a closure with variable types (lift later when called) + if (cenv.tenv.type(body)->var) return; for (size_t i = 0; i < prot->tup.size(); ++i) if (cenv.tenv.type(prot->tup[i])->var) return; - if (cenv.tenv.type(body)->var) - return; - + assert(!func); cenv.code.push_front(); // Write function declaration |