DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4581>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4581

erroneous static cast in programming examples

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED



------- Additional Comments From [EMAIL PROTECTED]  2001-11-01 20:20 -------
Why is this incorrect?

DefaultHandler "is a" ErrorHandler and 
DefaultHandler "is a" ContentHandler.

So I can cast the DefaultHandler to any one of it's subclasses without trouble. 

The code could be written as:

DefaultHandler* dh = new DefaultHandler();
ContentHandler* ch = (ContentHandler*) dh
ErrorHandler*   eh = (ErrorHandler*) dh;

but it's all the same code.

Or am I missing something?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to