Bug 163889 - [1.5][compiler] warning to cast if not and to not cast if so
Summary: [1.5][compiler] warning to cast if not and to not cast if so
Status: RESOLVED DUPLICATE of bug 159607
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.3 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-08 18:05 EST by Zorzella Mising name CLA
Modified: 2006-11-09 04:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zorzella Mising name CLA 2006-11-08 18:05:31 EST
In the following snippet, Eclipse will flag a warning for both invocations of "a", each suggesting the other as the correct.

*********

import java.lang.annotation.RetentionPolicy;

public class BorkedWarning {

  void a(Enum<?>...enums) {}

  void b () {
    RetentionPolicy[] t = null;
    a(t);
    a((Enum<?>[])t);
  }
}
Comment 1 Philipe Mulet CLA 2006-11-09 04:40:41 EST
This is fixed in HEAD (3.3). Fix was made available for 3.3M3.

Added VarargsTest#test057

*** This bug has been marked as a duplicate of 159607 ***