mirror of https://github.com/exaloop/codon.git
Fix lambdas [wip]
parent
377e619f7f
commit
41dcb83be0
|
@ -434,11 +434,14 @@ void TranslateVisitor::visit(AssignStmt *stmt) {
|
|||
seqassert(stmt->lhs->getId(), "expected IdExpr, got {}", stmt->lhs);
|
||||
auto var = stmt->lhs->getId()->value;
|
||||
if (!stmt->rhs || (!stmt->rhs->isType() && stmt->rhs->type)) {
|
||||
if (stmt->rhs && stmt->rhs->type->getFunc())
|
||||
if (stmt->rhs && stmt->rhs->type->getFunc()) {
|
||||
result = transform(stmt->rhs);
|
||||
return;
|
||||
}
|
||||
if (stmt->rhs && stmt->rhs->type->getPartial() &&
|
||||
!ctx->find(stmt->rhs->type->getClass()->realizedTypeName())) {
|
||||
// Partial generic; ignore [TODO]
|
||||
result = transform(stmt->rhs);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ void ScopingVisitor::apply(Cache *cache, StmtPtr &s) {
|
|||
ScopingVisitor v;
|
||||
v.ctx = c;
|
||||
v.transformBlock(s);
|
||||
// LOG("-> {}", s->toString(2));
|
||||
LOG("-> {}", s->toString(2));
|
||||
}
|
||||
|
||||
ExprPtr ScopingVisitor::transform(const std::shared_ptr<Expr> &expr) {
|
||||
|
|
Loading…
Reference in New Issue