anonym -> method ref: disable for method calls with qualifiers which ref params (IDEA-93473)

This commit is contained in:
anna
2012-10-25 18:05:07 +02:00
parent d9a6fb12b7
commit 86872fa9a6
4 changed files with 71 additions and 10 deletions
@@ -0,0 +1,12 @@
// "Replace with method reference" "true"
interface Foo<A, B> {
B f(A a);
}
interface DeeBee<A> {
A run(Void c) throws SQLException;
<B> DeeBee<B> bind(final Foo<A, DeeBee<B>> f) default {
return f.f(null)::run;
}
}
@@ -0,0 +1,16 @@
// "Replace with method reference" "true"
interface Foo<A, B> {
B f(A a);
}
interface DeeBee<A> {
A run(Void c) throws SQLException;
<B> DeeBee<B> bind(final Foo<A, DeeBee<B>> f) default {
return new Dee<caret>Bee<B> () {
public B run(final Void c) throws SQLException {
return f.f(null).run(c);
}
};
}
}
@@ -0,0 +1,16 @@
// "Replace with method reference" "false"
interface Foo<A, B> {
B f(A a);
}
interface DeeBee<A> {
A run(Void c) throws SQLException;
<B> DeeBee<B> bind(final Foo<A, DeeBee<B>> f) default {
return new Dee<caret>Bee<B> () {
public B run(final Void c) throws SQLException {
return f.f(DeeBee.this.run(c)).run(c);
}
};
}
}