Moved method.
This commit is contained in:
+2
-22
@@ -460,12 +460,12 @@ public final class JavaFunctionResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean containsErrorType(@NotNull List<FunctionDescriptor> superFunctions, @NotNull FunctionDescriptor function) {
|
private static boolean containsErrorType(@NotNull List<FunctionDescriptor> superFunctions, @NotNull FunctionDescriptor function) {
|
||||||
if (containsErrorType(function)) {
|
if (ErrorUtils.containsErrorType(function)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (FunctionDescriptor superFunction : superFunctions) {
|
for (FunctionDescriptor superFunction : superFunctions) {
|
||||||
if (containsErrorType(superFunction)) {
|
if (ErrorUtils.containsErrorType(superFunction)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -473,26 +473,6 @@ public final class JavaFunctionResolver {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean containsErrorType(@NotNull FunctionDescriptor function) {
|
|
||||||
if (ErrorUtils.containsErrorType(function.getReturnType())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
for (ValueParameterDescriptor parameter : function.getValueParameters()) {
|
|
||||||
if (ErrorUtils.containsErrorType(parameter.getType())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (TypeParameterDescriptor parameter : function.getTypeParameters()) {
|
|
||||||
for (JetType upperBound : parameter.getUpperBounds()) {
|
|
||||||
if (ErrorUtils.containsErrorType(upperBound)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static SimpleFunctionDescriptor recordSamConstructor(ClassDescriptorFromJvmBytecode klass, SimpleFunctionDescriptor constructorFunction, BindingTrace trace) {
|
private static SimpleFunctionDescriptor recordSamConstructor(ClassDescriptorFromJvmBytecode klass, SimpleFunctionDescriptor constructorFunction, BindingTrace trace) {
|
||||||
trace.record(JavaBindingContext.SAM_CONSTRUCTOR_TO_INTERFACE, constructorFunction, klass);
|
trace.record(JavaBindingContext.SAM_CONSTRUCTOR_TO_INTERFACE, constructorFunction, klass);
|
||||||
trace.record(BindingContext.SOURCE_DESCRIPTOR_FOR_SYNTHESIZED, constructorFunction, klass);
|
trace.record(BindingContext.SOURCE_DESCRIPTOR_FOR_SYNTHESIZED, constructorFunction, klass);
|
||||||
|
|||||||
@@ -45,6 +45,26 @@ public class ErrorUtils {
|
|||||||
ERROR_MODULE = module;
|
ERROR_MODULE = module;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean containsErrorType(@NotNull FunctionDescriptor function) {
|
||||||
|
if (containsErrorType(function.getReturnType())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
for (ValueParameterDescriptor parameter : function.getValueParameters()) {
|
||||||
|
if (containsErrorType(parameter.getType())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (TypeParameterDescriptor parameter : function.getTypeParameters()) {
|
||||||
|
for (JetType upperBound : parameter.getUpperBounds()) {
|
||||||
|
if (containsErrorType(upperBound)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static class ErrorScope implements JetScope {
|
public static class ErrorScope implements JetScope {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user