Skip to content

Commit

Permalink
Bugfix for Array.insertManyAt returns original array for empty insert…
Browse files Browse the repository at this point in the history
…ion (dotnet#18352)
  • Loading branch information
muqiuhan committed Mar 3, 2025
1 parent 32c2764 commit 4b0213e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FSharp.Core/array.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ module Array =
let valuesArray = Seq.toArray values

if valuesArray.Length = 0 then
source
source.Clone() :?> 'T array
else
let length = source.Length + valuesArray.Length
let result = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked length
Expand Down

0 comments on commit 4b0213e

Please sign in to comment.