mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
IDEA-99536
This commit is contained in:
+1
-1
@@ -774,7 +774,7 @@ public class GenericsHighlightUtil {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!TypeConversionUtil.typesAgree(lTypeArg, rTypeArg, false)) return true;
|
||||
if (!TypeConversionUtil.typesAgree(lTypeArg, rTypeArg, true)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
import java.util.*;
|
||||
class A<<warning descr="Type parameter 'T' is never used">T</warning>> {
|
||||
}
|
||||
|
||||
class B<<warning descr="Type parameter 'S' is never used">S</warning>> extends A {
|
||||
}
|
||||
|
||||
class C extends A<String> {
|
||||
}
|
||||
|
||||
|
||||
class D extends A {
|
||||
}
|
||||
|
||||
|
||||
public class Main {
|
||||
public static void test(Collection<? extends A> <warning descr="Parameter 'c' is never used">c</warning>) {}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Collection<B> bs = new ArrayList<B>();
|
||||
test(bs);
|
||||
|
||||
Collection<C> cs = new ArrayList<C>();
|
||||
test(cs);
|
||||
|
||||
Collection<D> ds = new ArrayList<D>();
|
||||
test(ds);
|
||||
}
|
||||
}
|
||||
+1
@@ -160,6 +160,7 @@ public class LightAdvHighlightingJdk7Test extends LightDaemonAnalyzerTestCase {
|
||||
public void testUncheckedWarningIDEA21432() throws Exception { doTest(true, false); }
|
||||
public void testUncheckedWarningIDEA99357() throws Exception { doTest(true, false); }
|
||||
public void testUncheckedWarningIDEA26738() throws Exception { doTest(true, false); }
|
||||
public void testUncheckedWarningIDEA99536() throws Exception { doTest(true, false); }
|
||||
public void testDefaultMethodVisibility() throws Exception { doTest(true, false); }
|
||||
public void testInheritUnrelatedDefaults() throws Exception { doTest(true, false); }
|
||||
public void testNotInheritFromUnrelatedDefault() throws Exception { doTest(true, false); }
|
||||
|
||||
Reference in New Issue
Block a user