Feature Requests item #1868213, was opened at 2008-01-10 00:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438938&aid=1868213&group_id=44253
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Dave (pexatus)
Assigned to: Nobody/Anonymous (nobody)
Summary: Option to Require Explicit Downcasting
Initial Comment:
This is similar to feature request 1866162: http://sourceforge.net/tracker/index.php?func=detail&aid=1866162&group_id=44253&atid=438938
The Dr Java interactions window allows one to omit the explicit downcast required when assigning a subtype variable to reference a supertype object; e.g.
CharSequence cs = "abc";
String s = cs; // should be String s = (String) cs;
Since the omission of this cast is an error when compiling a Java program, it would be helpful to those using Java to teach to have an option to make the interactive interpreter show the same behavior as the compiler; i.e., report an error when the explicit downcast is omitted, so that students are not confused when a piece of code works in the interpreter but not the compiler.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438938&aid=1868213&group_id=44253
|