Bug 163889

Summary: [1.5][compiler] warning to cast if not and to not cast if so
Product: [Eclipse Project] JDT Reporter: Zorzella Mising name <zorzella>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.3 M3   
Hardware: PC   
OS: Linux   
Whiteboard:

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 ***