Files
kotlin-fork/idea/testData/inspections/cleanup/DeprecatedFunctionClasses.java
T
Alexander Udalov d14e5b8a72 Restore and deprecate Function{n}/ExtensionFunction{n} classes for easier migration
Users' Java code will not break in common cases (when passing functions to
Kotlin), and deprecation warnings will be reported.

Provide an inspection with a quick fix which allows to replace deprecated
function class usages to the new classes. Include this fix to the "code
cleanup" action
2015-05-28 01:20:05 +03:00

34 lines
715 B
Java
Vendored

import kotlin.Function0;
import kotlin.Function1;
import kotlin.KotlinPackage;
import kotlin.ExtensionFunction0;
import kotlin.Unit;
import kotlin.jvm.functions.Function2;
public class DeprecatedFunctionClasses {
void f1(Function0 f) {
f.invoke();
}
void f2() {
KotlinPackage.map(new int[]{}, new Function1<Integer, Object>() {
@Override
public Object invoke(Integer integer) {
return null;
}
});
}
void f3(Function2<String, String, String> f) {
}
void f4(kotlin.Function0<Unit> g) {
}
void f5(kotlin.jvm.functions.Function1 f) {
}
void f6(ExtensionFunction0<String, Integer> e) {
}
}