fable-compiler / Fable

F# to JavaScript, TypeScript, Python, Rust and Dart Compiler
http://fable.io/
MIT License
2.93k stars 301 forks source link

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

Open goswinr opened 7 months ago

goswinr commented 7 months ago

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

MangelMaxime commented 7 months ago

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.