Move inference parameter type in FunctionDescriptorResolver

This commit is contained in:
Stanislav Erokhin
2015-03-05 12:56:50 +03:00
parent 0c74675e6e
commit d9882a6d0b
13 changed files with 294 additions and 267 deletions
@@ -43,7 +43,7 @@ import org.jetbrains.kotlin.utils.UtilsPackage;
import java.util.*;
import static org.jetbrains.kotlin.resolve.DescriptorUtils.isDefaultObject;
import static org.jetbrains.kotlin.types.TypeUtils.CANT_INFER_LAMBDA_PARAM_TYPE;
import static org.jetbrains.kotlin.types.TypeUtils.CANT_INFER_FUNCTION_PARAM_TYPE;
public class DescriptorRendererImpl implements DescriptorRenderer {
@@ -350,7 +350,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer {
private String renderInflexibleType(@NotNull JetType type) {
assert !TypesPackage.isFlexible(type) : "Flexible types not allowed here: " + renderNormalizedType(type);
if (type == CANT_INFER_LAMBDA_PARAM_TYPE || TypeUtils.isDontCarePlaceholder(type)) {
if (type == CANT_INFER_FUNCTION_PARAM_TYPE || TypeUtils.isDontCarePlaceholder(type)) {
return "???";
}
if (ErrorUtils.isUninferredParameter(type)) {
@@ -43,7 +43,7 @@ public class TypeUtils {
public static final JetType DONT_CARE = ErrorUtils.createErrorTypeWithCustomDebugName("DONT_CARE");
public static final JetType PLACEHOLDER_FUNCTION_TYPE = ErrorUtils.createErrorTypeWithCustomDebugName("PLACEHOLDER_FUNCTION_TYPE");
public static final JetType CANT_INFER_LAMBDA_PARAM_TYPE = ErrorUtils.createErrorType("Cannot be inferred");
public static final JetType CANT_INFER_FUNCTION_PARAM_TYPE = ErrorUtils.createErrorType("Cannot be inferred");
public static class SpecialType implements JetType {
private final String name;