mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-03 03:37:58 +07:00
anonymous -> lambda: accept anonymous classes with inferred another type and ref to a parameter as the cast would be inserted (IDEA-157457)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// "Replace with lambda" "true"
|
||||
class DbTableBinder {
|
||||
|
||||
public Binder build() {
|
||||
return (Binder<DbTable>) (q, dbTable) -> q.bind("name", dbTable.name);
|
||||
}
|
||||
}
|
||||
|
||||
class DbTable {
|
||||
String name;
|
||||
}
|
||||
|
||||
interface Binder <ArgType> {
|
||||
void bind(A<?> sqlStatement, ArgType argType);
|
||||
}
|
||||
|
||||
interface A<P> {
|
||||
void bind(String s, String p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user