ComponentStoreWithExtraComponents: Workaround for Kotlin compiler bug

KT-42831 CCE when a method returning generic type is called from annotated if statement

Fixes the following exception:
  - java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class kotlin.Unit

GitOrigin-RevId: 7aa254a1d9439af37ece9fbc76ecb85b895e7e27
This commit is contained in:
Eldar Abusalimov
2020-10-20 17:02:57 +00:00
committed by intellij-monorepo-bot
parent 927fec3b93
commit 9e55da7eb9
@@ -38,8 +38,7 @@ abstract class ComponentStoreWithExtraComponents : ComponentStoreImpl() {
}
final override fun initComponent(component: Any, serviceDescriptor: ServiceDescriptor?, pluginId: PluginId?) {
@Suppress("DEPRECATION")
if (component is com.intellij.openapi.components.SettingsSavingComponent) {
if (component is @Suppress("DEPRECATION") com.intellij.openapi.components.SettingsSavingComponent) {
settingsSavingComponents.add(component)
}
else if (component is SettingsSavingComponent) {