mirror of https://github.com/exaloop/codon.git
Fix hetero-tuple issue with fn_overloads
parent
d1b5279ffa
commit
da709f5424
|
@ -289,6 +289,15 @@ TypecheckVisitor::transformStaticLoopCall(
|
|||
!ctx->cache->functions[method.name].type)
|
||||
continue;
|
||||
if (method.age <= ctx->age) {
|
||||
if (typ->getHeterogenousTuple()) {
|
||||
auto &ast = ctx->cache->functions[method.name].ast;
|
||||
if (ast->hasAttr("autogenerated") &&
|
||||
(endswith(ast->name, ".__iter__:0") ||
|
||||
endswith(ast->name, ".__getitem__:0"))) {
|
||||
// ignore __getitem__ and other heterogenuous methods
|
||||
continue;
|
||||
}
|
||||
}
|
||||
stmt->rhs = N<IdExpr>(method.name);
|
||||
block.push_back(wrap(stmt->clone()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue