[progress Communities] [progress Openedge Abl] Forum Post: Re: Cast Vs Dynamic-cast

  • Thread starter Thread starter Laura Stern
  • Start date Start date
Status
Not open for further replies.
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...
 
Status
Not open for further replies.
Back
Top