mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
anonym -> method ref: disable for method calls with qualifiers which ref params (IDEA-93473)
This commit is contained in:
+12
@@ -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;
|
||||
}
|
||||
}
|
||||
+16
@@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
+16
@@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user