runtime: fix map len and chan len/cap

This commit is contained in:
visualfc
2024-09-25 20:51:58 +08:00
parent 32f41a04ac
commit c184dc8d2f
7 changed files with 487 additions and 161 deletions

View File

@@ -1083,7 +1083,7 @@ func (b Builder) BuiltinCall(fn string, args ...Expr) (ret Expr) {
case vkChan:
return b.InlineCall(b.Pkg.rtFunc("ChanLen"), arg)
case vkMap:
return b.MapLen(arg)
return b.InlineCall(b.Pkg.rtFunc("MapLen"), arg)
}
}
case "cap":