Skip to content

Commit ac80542

Browse files
EricCornelsonEric Cornelson
andauthored
Avoid calculating spread indices multiple times per array literal (#170)
Co-authored-by: Eric Cornelson <[email protected]>
1 parent 944e3e6 commit ac80542

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/compiler/checker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17761,6 +17761,7 @@ func (c *Checker) getSpreadIndices(node *ast.Node) (int, int) {
1776117761
}
1776217762
}
1776317763
links.firstSpreadIndex, links.lastSpreadIndex = first, last
17764+
links.indicesComputed = true
1776417765
}
1776517766
return links.firstSpreadIndex, links.lastSpreadIndex
1776617767
}

0 commit comments

Comments
 (0)