diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/load/java/sam/JvmSamConversionTransformer.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/load/java/sam/JvmSamConversionTransformer.kt index 0146f609024..47a902651ad 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/load/java/sam/JvmSamConversionTransformer.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/load/java/sam/JvmSamConversionTransformer.kt @@ -11,22 +11,16 @@ import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.impl.TypeAliasConstructorDescriptor -import org.jetbrains.kotlin.resolve.sam.SamConversionResolver import org.jetbrains.kotlin.load.java.descriptors.JavaClassConstructorDescriptor import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor import org.jetbrains.kotlin.resolve.calls.components.SamConversionTransformer import org.jetbrains.kotlin.synthetic.hasJavaOriginInHierarchy import org.jetbrains.kotlin.types.KotlinType -import org.jetbrains.kotlin.types.UnwrappedType class JvmSamConversionTransformer( - private val samResolver: SamConversionResolver, private val languageVersionSettings: LanguageVersionSettings ) : SamConversionTransformer { - override fun getFunctionTypeForPossibleSamType(possibleSamType: UnwrappedType): UnwrappedType? = - SingleAbstractMethodUtils.getFunctionTypeForSamType(possibleSamType, samResolver)?.unwrap() - override fun shouldRunSamConversionForFunction(candidate: CallableDescriptor): Boolean { if (languageVersionSettings.supportsFeature(LanguageFeature.SamConversionForKotlinFunctions)) return true diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt index 08ac18f24cf..6a2ce0fce16 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/ExternalComponents.kt @@ -78,14 +78,11 @@ interface KotlinResolutionCallbacks { @DefaultImplementation(impl = SamConversionTransformer.Empty::class) interface SamConversionTransformer { - fun getFunctionTypeForPossibleSamType(possibleSamType: UnwrappedType): UnwrappedType? - fun shouldRunSamConversionForFunction(candidate: CallableDescriptor): Boolean fun isPossibleSamType(samType: KotlinType): Boolean object Empty : SamConversionTransformer { - override fun getFunctionTypeForPossibleSamType(possibleSamType: UnwrappedType): UnwrappedType? = null override fun shouldRunSamConversionForFunction(candidate: CallableDescriptor): Boolean = false override fun isPossibleSamType(samType: KotlinType): Boolean { val descriptor = samType.constructor.declarationDescriptor