Minor. Do not record method within resolveMethodToFunctionDescriptor

This commit is contained in:
Denis Zharkov
2015-09-30 19:58:19 +03:00
parent 9d087ce5bd
commit 27b231cd7d
2 changed files with 4 additions and 7 deletions
@@ -97,7 +97,7 @@ class LazyJavaClassDescriptor(
private val functionTypeForSamInterface = c.storageManager.createNullableLazyValue {
c.components.samConversionResolver.resolveFunctionTypeIfSamInterface(this) { method ->
unsubstitutedMemberScope.resolveMethodToFunctionDescriptor(method, false)
unsubstitutedMemberScope.resolveMethodToFunctionDescriptor(method)
}
}
@@ -81,7 +81,8 @@ public abstract class LazyJavaScope(
val result = LinkedHashSet<SimpleFunctionDescriptor>()
for (method in memberIndex().findMethodsByName(name)) {
val descriptor = resolveMethodToFunctionDescriptor(method, true)
val descriptor = resolveMethodToFunctionDescriptor(method)
c.components.javaResolverCache.recordMethod(method, descriptor)
result.add(descriptor)
if (method.isStatic) {
result.addIfNotNull(c.components.samConversionResolver.resolveSamAdapter(descriptor))
@@ -104,7 +105,7 @@ public abstract class LazyJavaScope(
returnType: JetType,
valueParameters: ResolvedValueParameters): MethodSignatureData
fun resolveMethodToFunctionDescriptor(method: JavaMethod, record: Boolean = true): JavaMethodDescriptor {
fun resolveMethodToFunctionDescriptor(method: JavaMethod): JavaMethodDescriptor {
val annotations = c.resolveAnnotations(method)
val functionDescriptorImpl = JavaMethodDescriptor.createJavaMethod(
containingDeclaration, annotations, method.getName(), c.components.sourceElementFactory.source(method)
@@ -133,10 +134,6 @@ public abstract class LazyJavaScope(
functionDescriptorImpl.setParameterNamesStatus(effectiveSignature.hasStableParameterNames(), valueParameters.hasSynthesizedNames)
if (record) {
c.components.javaResolverCache.recordMethod(method, functionDescriptorImpl)
}
if (signatureErrors.isNotEmpty()) {
c.components.externalSignatureResolver.reportSignatureErrors(functionDescriptorImpl, signatureErrors)
}