Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/DiamondNeg12.java
T
anna 3bb0c9d03a diamonds; actual types accepted in java 7 even if no formal types were defined!
(cherry picked from commit 903984b162008a56def605c72743c22517304a2d)
2011-05-02 21:14:20 +02:00

11 lines
385 B
Java

class Neg12 {
static class Foo<X> {
<T> Foo(T t) {}
}
Foo<Integer> fi1 = new <<error descr="Actual type argument and inferred type contradict each other">String</error>> Foo<>(1);
Foo<Integer> fi2 = new <<error descr="Actual type argument and inferred type contradict each other">String</error>> Foo<Integer>(1);
Foo<Integer> fi3 = new Foo<Integer>(1);
}