Update to go v1.23.2

This commit is contained in:
Vorapol Rinsatitnon
2024-10-02 08:34:23 +10:00
parent 439cdb4d4e
commit 45c3c1f20a
6 changed files with 449 additions and 9 deletions

View File

@@ -318,9 +318,9 @@ func containsClosure(f, c *ir.Func) bool {
return false
}
// Closures within function Foo are named like "Foo.funcN..."
// Closures within function Foo are named like "Foo.funcN..." or "Foo-rangeN".
// TODO(mdempsky): Better way to recognize this.
fn := f.Sym().Name
cn := c.Sym().Name
return len(cn) > len(fn) && cn[:len(fn)] == fn && cn[len(fn)] == '.'
return len(cn) > len(fn) && cn[:len(fn)] == fn && (cn[len(fn)] == '.' || cn[len(fn)] == '-')
}