diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt b/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt index 869a69883f0..c6b64deb0a4 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt @@ -28,7 +28,7 @@ abstract class AbstractTypeConstructor(storageManager: StorageManager) : TypeCon private class Supertypes( val allSupertypes: Collection) { // initializer is only needed as a stub for case when 'getSupertypes' is called while 'supertypes' are being calculated - var supertypesWithoutCycles: List = (allSupertypes as? List) ?: allSupertypes.toList() + var supertypesWithoutCycles: List = listOf(ERROR_TYPE) } private val supertypes = storageManager.createLazyValueWithPostCompute(