|
True.
Actually you made me remember we have had some discussion about this on the list some time ago : http://groups.google.com/group/boolang/browse_thread/thread/6ca52fca357c4b37 The downcast is by design, however there is still the option of a gentle booc warning about this, after looking at the discussion again maybe we could emit the warning only when the implicit cast occurs in a assignment expression in order to keep the "Dispatch example" Rodrigo pointed out in the discussion to compile without warning. What do you think? |
||||||||||||||||||||||||||||||||||||||||||||
Your code is equivalent to:
array1 as (object) = ("titi", "toto", 1,)
names as (string) = array1
This is a valid implicit cast, just like:
o1 as object = 1
name as string = o1
Although I would prefer if downcasts weren't implicit.