Add reporting of the warnings based on Java annotations for expanded type aliases

Before that, such warnings weren't reported as the corresponding errors were reported during type inference (only original types took part there)
This commit is contained in:
Victor Petukhov
2021-02-04 11:42:52 +03:00
parent d783d99443
commit 0d40022d6d
22 changed files with 186 additions and 114 deletions
@@ -224,7 +224,7 @@ class CompositeResolverForModuleFactory(
}
class CompositeAnalyzerServices(val services: List<PlatformDependentAnalyzerServices>) : PlatformDependentAnalyzerServices() {
override val platformConfigurator: PlatformConfigurator = CompositePlatformConigurator(services.map { it.platformConfigurator })
override val platformConfigurator: PlatformConfigurator = CompositePlatformConfigurator(services.map { it.platformConfigurator })
override fun computePlatformSpecificDefaultImports(storageManager: StorageManager, result: MutableList<ImportPath>) {
val intersectionOfDefaultImports = services.map { service ->
@@ -247,7 +247,7 @@ class CompositeAnalyzerServices(val services: List<PlatformDependentAnalyzerServ
if (isEmpty()) emptyList() else reduce { first, second -> first.intersect(second) }.toList()
}
class CompositePlatformConigurator(private val componentConfigurators: List<PlatformConfigurator>) : PlatformConfigurator {
class CompositePlatformConfigurator(private val componentConfigurators: List<PlatformConfigurator>) : PlatformConfigurator {
override val platformSpecificContainer: StorageComponentContainer
get() = composeContainer(this::class.java.simpleName) {
configureDefaultCheckers()
@@ -256,8 +256,8 @@ class CompositePlatformConigurator(private val componentConfigurators: List<Plat
}
}
override fun configureModuleComponents(container: StorageComponentContainer) {
componentConfigurators.forEach { it.configureModuleComponents(container) }
override fun configureModuleComponents(container: StorageComponentContainer, languageVersionSettings: LanguageVersionSettings) {
componentConfigurators.forEach { it.configureModuleComponents(container, languageVersionSettings) }
}
override fun configureModuleDependentCheckers(container: StorageComponentContainer) {
@@ -266,6 +266,5 @@ class CompositePlatformConigurator(private val componentConfigurators: List<Plat
// Unfortunately, it is declared in base class, so repeating call to 'configureModuleDependentCheckers' will lead
// to multiple registrrations.
container.useImpl<ExperimentalMarkerDeclarationAnnotationChecker>()
container.useImpl<UpperBoundChecker>()
}
}