diff options
Diffstat (limited to 'java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting')
2 files changed, 35 insertions, 0 deletions
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA55510.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA55510.java index 5776db03ae4b..2db53078fce5 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA55510.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA55510.java @@ -34,3 +34,20 @@ class Records { } } } +//--------------------------------------------- +class Parent<T extends Parent.NestedParent> +{ + protected static interface NestedParent + { + } +} + +class Test +{ + public final static class Child extends Parent<<error descr="NestedChild is not accessible in current context">Child.NestedChild</error>> + { + private static interface NestedChild extends NestedParent + { + } + } +}
\ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA78402.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA78402.java new file mode 100644 index 000000000000..ed8d259ab462 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting/IDEA78402.java @@ -0,0 +1,18 @@ +import java.util.Collection; +import java.util.List; + +class Reference<T> {} + +class Bug { + private static <T> void foo(List<T> x, Reference<String> y) { + System.out.println(x); + } + + private static <T> void foo(Collection<T> x, Reference<T> y) { + System.out.println(x); + } + + public static void bazz(List<String> bar) { + foo<error descr="Ambiguous method call: both 'Bug.foo(List<String>, Reference<String>)' and 'Bug.foo(Collection<String>, Reference<String>)' match">(bar, null)</error>; + } +}
\ No newline at end of file |