mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
method refs: fix testdata according to new javac strategy
This commit is contained in:
-13
@@ -1,13 +0,0 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class NonStaticInner {
|
||||
class Inner {
|
||||
Inner() {}
|
||||
}
|
||||
|
||||
interface I1 {
|
||||
Inner m(NonStaticInner rec);
|
||||
}
|
||||
static {
|
||||
I1 i1 = Inner::new;
|
||||
}
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
Foo(Integer i) {}
|
||||
Foo() {}
|
||||
}
|
||||
|
||||
interface I1<X> {
|
||||
X m(int i);
|
||||
}
|
||||
|
||||
interface I2<X> {
|
||||
X m();
|
||||
}
|
||||
|
||||
interface I3<X> {
|
||||
X m(NonStaticInner3 rec, int i);
|
||||
}
|
||||
|
||||
interface I4<X> {
|
||||
X m(NonStaticInner3 rec);
|
||||
}
|
||||
|
||||
{
|
||||
I1<Foo> b1 = (i) -> new Foo(i);
|
||||
I2<Foo> b2 = () -> new Foo();
|
||||
}
|
||||
|
||||
{
|
||||
I3<Foo> b1 = Foo::new;
|
||||
I4<Foo> b2 = (rec) -> rec.new Foo();
|
||||
}
|
||||
}
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
Foo(Integer i) {}
|
||||
Foo() {}
|
||||
}
|
||||
|
||||
interface I1<X> {
|
||||
X m(int i);
|
||||
}
|
||||
|
||||
interface I2<X> {
|
||||
X m();
|
||||
}
|
||||
|
||||
interface I3<X> {
|
||||
X m(NonStaticInner3 rec, int i);
|
||||
}
|
||||
|
||||
interface I4<X> {
|
||||
X m(NonStaticInner3 rec);
|
||||
}
|
||||
|
||||
{
|
||||
I1<Foo> b1 = (i) -> new Foo(i);
|
||||
I2<Foo> b2 = () -> new Foo();
|
||||
}
|
||||
|
||||
{
|
||||
I3<Foo> b1 = (rec, i) -> rec.new Foo(i);
|
||||
I4<Foo> b2 = Foo::new;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "false"
|
||||
class NonStaticInner {
|
||||
class Inner {
|
||||
Inner() {}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "false"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
Foo(Integer i) {}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Replace lambda with method reference" "true"
|
||||
// "Replace lambda with method reference" "false"
|
||||
class NonStaticInner3 {
|
||||
class Foo {
|
||||
Foo(Integer i) {}
|
||||
|
||||
@@ -10,7 +10,7 @@ public class MyTest {
|
||||
void m(Integer x);
|
||||
}
|
||||
|
||||
static void call(int i, I1 s) {}
|
||||
static void call(Integer i, I1 s) {}
|
||||
static void call(int i, I2 s) {}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
+2
-2
@@ -10,10 +10,10 @@ public class MyTest {
|
||||
void m(Integer x);
|
||||
}
|
||||
|
||||
static void call(int i, I1 s) {}
|
||||
static void call(Integer i, I1 s) {}
|
||||
static void call(int i, I2 s) {}
|
||||
|
||||
public static void main(String[] args) {
|
||||
call(1, (I2) (x) -> MyTest.m(x));
|
||||
call(1, (x) -> MyTest.m(x));
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,10 +1,12 @@
|
||||
class Test1 {
|
||||
class Inner {}
|
||||
static class Inner {
|
||||
}
|
||||
|
||||
void test() {
|
||||
BlahBlah6 blahBlah62 = Inner:<caret>:new;
|
||||
}
|
||||
}
|
||||
|
||||
interface BlahBlah6 {
|
||||
Test1.Inner foo6(Test1 p);
|
||||
Test1.Inner foo6();
|
||||
}
|
||||
+5
-3
@@ -1,10 +1,12 @@
|
||||
class Test1 {
|
||||
class Inner {}
|
||||
static class Inner {
|
||||
}
|
||||
|
||||
void test() {
|
||||
BlahBlah6 blahBlah62 = (p) -> p.new Inner();
|
||||
BlahBlah6 blahBlah62 = () -> new Inner();
|
||||
}
|
||||
}
|
||||
|
||||
interface BlahBlah6 {
|
||||
Test1.Inner foo6(Test1 p);
|
||||
Test1.Inner foo6();
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
class MyTest {
|
||||
class Inner {
|
||||
Inner() {};
|
||||
static class Inner {
|
||||
Inner(MyTest mt) {};
|
||||
}
|
||||
|
||||
interface I {
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
class MyTest {
|
||||
class Inner {
|
||||
Inner() {};
|
||||
static class Inner {
|
||||
Inner(MyTest mt) {};
|
||||
}
|
||||
|
||||
interface I {
|
||||
@@ -8,6 +8,6 @@ class MyTest {
|
||||
}
|
||||
|
||||
static {
|
||||
I i1 = (receiver) -> receiver.new Inner();
|
||||
I i1 = (receiver) -> new Inner(receiver);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ class Test<T> {
|
||||
|
||||
class Bar {
|
||||
void test() {
|
||||
Runnable runnable = Test<String>:<caret>:foo;
|
||||
Runnable runnable = Test:<caret>:foo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user