XSharpPublic
XSharpPublic copied to clipboard
ARRAY OF <type> missing compile time checks
I am not sure if this is supposed to be supported or not, please ignore if not:
FUNCTION Start() AS VOID
LOCAL a AS ARRAY of INT
a := ArrayCreate(10) // System.NullReferenceException, shouldn't that create an appropriate array instance?
a := {1,2,3,"A", {1,2}} // XSharp.Error: Value does not fall within the expected range. Shouldn't it be a compiler error?
a[2] := "A" // compiler error cannot convert string to int, OK!
? a[2]