mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
[tests] prepares Java tests for the language level raise
This commit is contained in:
@@ -1,27 +1,25 @@
|
||||
class MyTest {
|
||||
|
||||
private static class Foo {
|
||||
static int foo(int i) { return i; }
|
||||
}
|
||||
|
||||
|
||||
static Foo foo = new Foo();
|
||||
|
||||
static void foo(String s) {}
|
||||
|
||||
|
||||
static void bar(Integer i, Number n) {}
|
||||
static void bar(Number n, Integer i) {}
|
||||
|
||||
|
||||
void baz(int i) {}
|
||||
}
|
||||
|
||||
class AlienTest {
|
||||
|
||||
interface IInt {
|
||||
int _(int i);
|
||||
int m(int i);
|
||||
}
|
||||
|
||||
|
||||
interface IIntInt {
|
||||
int _(Integer i1, Integer i2);
|
||||
int m(Integer i1, Integer i2);
|
||||
}
|
||||
|
||||
static {
|
||||
@@ -35,34 +33,31 @@ class AlienTest {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MyTest1 {
|
||||
|
||||
interface I1 {
|
||||
int[] _();
|
||||
int[] m();
|
||||
}
|
||||
|
||||
interface I2 {
|
||||
Object _();
|
||||
}
|
||||
|
||||
interface I3 {
|
||||
char[] _();
|
||||
}
|
||||
|
||||
interface I4 {
|
||||
|
||||
boolean _();
|
||||
interface I2 {
|
||||
Object m();
|
||||
}
|
||||
|
||||
interface I3 {
|
||||
char[] m();
|
||||
}
|
||||
|
||||
interface I4 {
|
||||
boolean m();
|
||||
}
|
||||
|
||||
interface I5 {
|
||||
Class<? extends MyTest1> _();
|
||||
Class<? extends MyTest1> m();
|
||||
}
|
||||
|
||||
interface I6 {
|
||||
Class<MyTest1> _();
|
||||
Class<MyTest1> m();
|
||||
}
|
||||
|
||||
|
||||
void foo(Object[] arr) {
|
||||
I1 c1 = <error descr="Bad return type in method reference: cannot convert java.lang.Object[] to int[]">arr :: clone</error>;
|
||||
I2 c2 = arr :: clone;
|
||||
|
||||
Reference in New Issue
Block a user