Check platform<->impl declaration compatibility
For each platform declaration, there must be at least one impl declaration in the module with the compatible signature; similarly, for each impl declaration, there must be at least one platform declaration with the compatible signature. Note that currently the presence of the 'impl' modifier is not checked yet. Also, the sad fact is that if you have platform and impl declarations which are not compatible, you get two errors: on the platform delcaration and on the impl declaration. This needs to be addressed as well
This commit is contained in:
+3
-1
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.container.useImpl
|
||||
import org.jetbrains.kotlin.container.useInstance
|
||||
import org.jetbrains.kotlin.platform.JavaToKotlinClassMap
|
||||
import org.jetbrains.kotlin.resolve.PlatformConfigurator
|
||||
import org.jetbrains.kotlin.resolve.checkers.PlatformImplDeclarationChecker
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmOverloadFilter
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmTypeSpecificityComparator
|
||||
import org.jetbrains.kotlin.resolve.jvm.RuntimeAssertionsTypeChecker
|
||||
@@ -43,7 +44,8 @@ object JvmPlatformConfigurator : PlatformConfigurator(
|
||||
TypeParameterBoundIsNotArrayChecker(),
|
||||
JvmSyntheticApplicabilityChecker(),
|
||||
StrictfpApplicabilityChecker(),
|
||||
AdditionalBuiltInsMemberOverrideDeclarationChecker
|
||||
AdditionalBuiltInsMemberOverrideDeclarationChecker,
|
||||
PlatformImplDeclarationChecker()
|
||||
),
|
||||
|
||||
additionalCallCheckers = listOf(
|
||||
|
||||
Reference in New Issue
Block a user