-
Enhancement
-
Resolution: Duplicate
-
P4
-
None
-
9
The class Infer.Inference context defines this callback function:
void addFreeTypeListener(List<Type> types, FreeTypeListener ftl) {
freeTypeListeners.put(ftl, freeVarsIn(types));
}
where FreeTypeListener is defined as follows:
interface FreeTypeListener {
void typesInferred(InferenceContext inferenceContext);
}
This is a functional interfaces, and usages of the callback should be tweaked to use lambdas instead of anonymous inner classes.
void addFreeTypeListener(List<Type> types, FreeTypeListener ftl) {
freeTypeListeners.put(ftl, freeVarsIn(types));
}
where FreeTypeListener is defined as follows:
interface FreeTypeListener {
void typesInferred(InferenceContext inferenceContext);
}
This is a functional interfaces, and usages of the callback should be tweaked to use lambdas instead of anonymous inner classes.
- duplicates
-
JDK-8171370 Convert anonymous inner classes into lambdas/method references
-
- Closed
-