diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/checker/IntersectionType.kt b/core/descriptors/src/org/jetbrains/kotlin/types/checker/IntersectionType.kt index 462b075b874..48f472c9c61 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/checker/IntersectionType.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/checker/IntersectionType.kt @@ -99,7 +99,8 @@ object TypeIntersector { } else it } - return intersectTypesWithoutIntersectionType(correctNullability) + val resultAttributes = types.map { it.attributes }.reduce { x, y -> x.intersect(y) } + return intersectTypesWithoutIntersectionType(correctNullability).replaceAttributes(resultAttributes) } // nullability here is correct