Refactoring: make parameters of getFunctionTypeForSamType not null
This commit is contained in:
+6
-1
@@ -17,7 +17,6 @@
|
||||
package org.jetbrains.kotlin.load.java.components
|
||||
|
||||
import org.jetbrains.kotlin.container.DefaultImplementation
|
||||
import org.jetbrains.kotlin.container.PlatformExtensionsClashResolver
|
||||
import org.jetbrains.kotlin.container.PlatformSpecificExtension
|
||||
import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor
|
||||
import org.jetbrains.kotlin.types.SimpleType
|
||||
@@ -28,5 +27,11 @@ interface SamConversionResolver : PlatformSpecificExtension<SamConversionResolve
|
||||
override fun resolveFunctionTypeIfSamInterface(classDescriptor: JavaClassDescriptor): SimpleType? = null
|
||||
}
|
||||
|
||||
object JavaBasedSamConversionResolver : SamConversionResolver {
|
||||
override fun resolveFunctionTypeIfSamInterface(classDescriptor: JavaClassDescriptor): SimpleType? {
|
||||
return classDescriptor.defaultFunctionTypeForSamInterface
|
||||
}
|
||||
}
|
||||
|
||||
fun resolveFunctionTypeIfSamInterface(classDescriptor: JavaClassDescriptor): SimpleType?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user