This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE Dev (Build 201307202300) Operating System = Windows 7 version 6.1 running on x86 Java; VM; Vendor = 1.8.0-ea Runtime = Java HotSpot(TM) Client VM 25.0-b41 Before: import java.util.*; class Test<T> { static void test() { Number s = new Test<Number>().first(Arrays.asList(0)); // Hint: "Use diamond inference" } T first(List<T> t) { return t.get(0); } } After: import java.util.*; class Test<T> { static void test() { Number s = new Test<>().first(Arrays.asList(0)); // Error: "incompatible types: Object cannot be converted to Number" } T first(List<T> t) { return t.get(0); } } Same for "T first(List<? extends T> t)". Works correctly for "<U extends T> U first(List<U> u)". So in the first two cases the hint should not be shown since the compiler needs this type information.
Fixed: http://hg.netbeans.org/jet-main/rev/3dcdd113c5bb
Integrated into 'main-silver', will be available in build *201308202300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/3dcdd113c5bb User: Jan Lahoda <jlahoda@netbeans.org> Log: #158491𸺩𹑌𷼥(partial): incorporating updated nb-javac