When having the following statement I would expect an error because my array may not have null elements.
Int[] array2 := [1,null,3,4,5]
Only in this case should that be ok.
Int?[] array2 := [1,null,3,4,5]
I do not how far you can go with the null ability checks.
brianSat 10 Apr 2010
Probably could be a little smarter there, but the reason it is allowed is that Fantom does an automatic cast from Int?[] to Int[] (like any other automatic cast).
jessevdam Wed 7 Apr 2010
When having the following statement I would expect an error because my array may not have null elements.
Only in this case should that be ok.
I do not how far you can go with the null ability checks.
brian Sat 10 Apr 2010
Probably could be a little smarter there, but the reason it is allowed is that Fantom does an automatic cast from
Int?[]
toInt[]
(like any other automatic cast).