method refs: fix testdata according to new javac strategy

This commit is contained in:
anna
2013-02-26 16:25:57 +01:00
parent a41b5c6f85
commit 456a49ce9f
13 changed files with 21 additions and 96 deletions

View File

@@ -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;
}
}

View File

@@ -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();
}
}

View File

@@ -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;
}
}

View File

@@ -1,4 +1,4 @@
// "Replace lambda with method reference" "true"
// "Replace lambda with method reference" "false"
class NonStaticInner {
class Inner {
Inner() {}

View File

@@ -1,4 +1,4 @@
// "Replace lambda with method reference" "true"
// "Replace lambda with method reference" "false"
class NonStaticInner3 {
class Foo {
Foo(Integer i) {}

View File

@@ -1,4 +1,4 @@
// "Replace lambda with method reference" "true"
// "Replace lambda with method reference" "false"
class NonStaticInner3 {
class Foo {
Foo(Integer i) {}