Bug 78084 - [compiler] necessary cast reported as unnecessary
Summary: [compiler] necessary cast reported as unnecessary
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 12:37 EST by Boris Kolar CLA
Modified: 2005-04-30 08:58 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Kolar CLA 2004-11-08 12:37:40 EST
public abstract class SomeClass<T> {
  public final T element() {
    T result = (T) customElement(); // reports unnecessary cast
    return result;
  }
  protected abstract Object customElement();
}

Preferences: I had all warnings on.
Comment 1 Philipe Mulet CLA 2005-04-30 08:58:29 EDT
Cannot reproduce in latest. An unchecked cast is now reported.
Added GenericTypeTest#test636