How is it possible to find the type of an array that is declared inline?
I can’t call Introspection.GetType() on anything other than Object so I can’t use it to pass the array in.
I can’t determine the type of the array by setting it to a variant and using Introspection.GetType() on the variant.
The debugger CAN determine the initial type of the array (so why can’t I?)
The running code knows to throw an exception if I try to add something of the wrong type.
Dim d() as dictionary
d.MyArrayFunction
Function MyArrayFunction(objectArray() as Object)
dim v as Variant = objectArray
dim ti as Introspection.TypeInfo = Introspection.GetType(v)
dim baseType as Introspection.TypeInfo = ti.BaseType //BaseType will be Nil
break
objectArray.Append new Dictionary //THIS LINE WILL WORK
objectArray.Append new pair("123",123) //An exception of class IllegalCastException was not handled. The application must shut down.
End Function