Intersect attributes for intersection types

This commit is contained in:
Irene Dea
2021-10-13 13:52:12 -07:00
committed by Dmitriy Novozhilov
parent fad3c1f2f6
commit db471ca61e
@@ -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