Pass SamConversionResolver explicitly cause it should be call site module-local
This commit is contained in:
committed by
Pavel V. Talanov
parent
f0f6a252a5
commit
6f180416b1
+2
-1
@@ -21,8 +21,9 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.kotlin.types.SimpleType;
|
||||
|
||||
public interface JavaClassDescriptor extends ClassDescriptor {
|
||||
// Use SingleAbstractMethodUtils.getFunctionTypeForSamInterface() where possible. This is only a fallback
|
||||
@Nullable
|
||||
SimpleType getFunctionTypeForSamInterface();
|
||||
SimpleType getDefaultFunctionTypeForSamInterface();
|
||||
|
||||
/**
|
||||
* May return false even in case when the class is not SAM interface, but returns true only if it's definitely not a SAM.
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ class LazyJavaClassDescriptor(
|
||||
|
||||
override fun getDeclaredTypeParameters() = declaredParameters()
|
||||
|
||||
override fun getFunctionTypeForSamInterface(): SimpleType? = c.components.samConversionResolver.resolveFunctionTypeIfSamInterface(this)
|
||||
override fun getDefaultFunctionTypeForSamInterface(): SimpleType? = c.components.samConversionResolver.resolveFunctionTypeIfSamInterface(this)
|
||||
|
||||
override fun isDefinitelyNotSamInterface(): Boolean {
|
||||
if (kind != ClassKind.INTERFACE) return true
|
||||
|
||||
Reference in New Issue
Block a user