Details
Description
Testcase :
names as (string) = ("titi", "toto", 1,)
This compiles, and throws a InvalidCastException at run-time.
Reported by Marc Dassonneville.
Issue Links
| This issue is superceded by: | ||||
| BOO-1115 | Strict mode |
|
|
|
Testcase :
names as (string) = ("titi", "toto", 1,)
This compiles, and throws a InvalidCastException at run-time.
Reported by Marc Dassonneville.
| This issue is superceded by: | ||||
| BOO-1115 | Strict mode |
|
|
|
This is not a bug.
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.