fsharp.core.extensions icon indicating copy to clipboard operation
fsharp.core.extensions copied to clipboard

Fix out of range issues with GetEnumerator

Open Swoorup opened this issue 3 years ago • 2 comments

Fix the following exception:

let vec = Vec.ofArray [|1; 2; 3;|]
let s = seq { for i in vec do yield i }
s |> Seq.iter (printfn "%A")
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at <StartupCode$Domain-Pls-FsUtil>.$Vec.System-Collections-Generic-IEnumerable<'a>[email protected]<'a>.get_Current() in /Users/swoorup.joshi/work/gp-pls-fsutil/src/Domain.Pls.FsUtil/Vec.fs:line 454

Swoorup avatar Mar 18 '22 08:03 Swoorup

Hi @Swoorup, thanks for the fix. Could you attach a test case confirming that issue has been fixed?

Horusiath avatar Mar 21 '22 13:03 Horusiath

@Horusiath done.

Swoorup avatar Mar 23 '22 05:03 Swoorup