I20210407-0040
tagged this
05 Apr 19:09
ref to method ref to avoid compile error
Given:
public static Function<String, Integer> useTypeReferenceOnLocalType() {
return numberInText -> dummy(numberInText);
}
When:
Applying "Simplify lambda expression" cleanup...
Actual:
public static Function<String, Integer> useTypeReferenceOnLocalType() {
return this::dummy;
}
Expected:
public static Function<String, Integer> useTypeReferenceOnLocalType() {
return E::dummy;
}
Change-Id: I7d5c9d7fa452026777983e2d6296e86fd2750d54
Signed-off-by: Fabrice Tiercelin <fabrice.tiercelin@yahoo.fr>