diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/services/LLSealedInheritorsProviderFactoryForTests.kt b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/services/LLSealedInheritorsProviderFactoryForTests.kt index 68b355f2e5a..9565709b31b 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/services/LLSealedInheritorsProviderFactoryForTests.kt +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/services/LLSealedInheritorsProviderFactoryForTests.kt @@ -39,7 +39,9 @@ private class SealedClassInheritorsProviderForTests( else -> ktModule } - val inheritorsForModuleMap = inheritorsByModule.getValue(relevantModule) + // the module might be absent in the map if it doesn't have any .kt-files whatsoever, in which case + // there's definitely no sealed inheritors + val inheritorsForModuleMap = inheritorsByModule[relevantModule] ?: return emptyList() return inheritorsForModuleMap[firClass.classId] ?: firClass.sealedInheritorsAttr?.value ?: emptyList() } }