mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
testdata for IDEA-20244
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
import java.util.Collection;
|
||||
class Test {
|
||||
public static final UnaryFunction<Object, Object, RuntimeException> unaryFunction = new UnaryFunction<Object, Object, RuntimeException>() {
|
||||
public Object execute(Object o) throws RuntimeException {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
public static <A, B, X extends Throwable> void someMethod() {
|
||||
transformCollection(null, unaryFunction, null);
|
||||
}
|
||||
|
||||
public static <A, B, X extends Throwable> void transformCollection(Collection<? extends A> input, UnaryFunction<A, B, X> transform, Collection<? super B> output) throws X {
|
||||
for (A a : input) {
|
||||
B b = transform.execute(a);
|
||||
output.add(b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface UnaryFunction<A, B, X extends Throwable> {
|
||||
public B execute(A a) throws X;
|
||||
}
|
||||
@@ -229,6 +229,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
|
||||
public void testIDEA21597() throws Exception { doTest5(false);}
|
||||
public void testIDEA20573() throws Exception { doTest5(false);}
|
||||
public void testIDEA20244() throws Exception { doTest5(false);}
|
||||
|
||||
public void testIDEA27185(){ doTest(LanguageLevel.JDK_1_6, JavaSdkVersion.JDK_1_6, false); }
|
||||
public void testIDEA67571(){ doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false); }
|
||||
|
||||
Reference in New Issue
Block a user