L
Laura Stern
Guest
Well, at least I made Mike happy this morning! Yes, this is definitely a bug; thanks for logging it. I remember now (!!) that the compiler can sometimes determine that the CAST can never possibly work at runtime because the 2 objects bear no relationship with each other whatsoever. In that case it will fail to compile. But, for example, if one object is in the other's hierarchy, in either direction, the CAST will compile successfully. And as I said, for an interface, the compiler cannot make that judgment and should never error.
Continue reading...
Continue reading...