Fable icon indicating copy to clipboard operation
Fable copied to clipboard

Accessing a ResizeArray out of bounds, should generate an exception, like on .NET

Open goswinr opened this issue 1 year ago • 1 comments

undefined just hit me again! 🤦‍♂️ Could ResizeArray raise the same out of bound exception as arrays ? just like in commit https://github.com/fable-compiler/Fable/commit/1f4001be43206edb87b4808d651f7e031e947c3b for issue https://github.com/fable-compiler/Fable/issues/3729? see REPL

image

goswinr avatar Apr 24 '24 11:04 goswinr

It should be possible yes.

Only specificities of ResizeArray is that's the type we use to ensure that we generate a native JavaScript array. But changing the getter / setter to behave like on .NET should not break this specificity.

MangelMaxime avatar Apr 24 '24 12:04 MangelMaxime