[Swift-devel] Explicit subscript types at declaration

Yadu Nand yadudoc1729 at gmail.com
Wed Jun 29 16:43:48 CDT 2011


Hi,

In an earlier mail regarding issues in foreach where a type mismatch
between the default int type for indices and array keys, Mihael
suggested using subscript types at array declaration.

This involves saying ,
int assoc_array[string][int][ ]
(where empty brackets implicity mean int )

I've edited the parser to accept definitions of type [ type? ] instead of
the current [ ].
int array[ ][ int ] [ string ]
is converted to =>
<variable name="array" type="int[int][int][string]" isGlobal="false" xsi:nil="t\
rue"/>

Perhaps I should stick to empty brackets when it isn't defined to avoid
breaking existing code.
I'm stuck at translating to kml. How is this supposed to look in kml ?

Please let me know if I need to make any changes or if you have any
suggestions/advice on this.
It looks like, a lot of changes will be need to be made (almost everywhere
since the type itself now different).


-- 
Thanks and Regards,
Yadu Nand B



More information about the Swift-devel mailing list