Intersect attributes for intersection types
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
fad3c1f2f6
commit
db471ca61e
@@ -99,7 +99,8 @@ object TypeIntersector {
|
|||||||
} else it
|
} 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
|
// nullability here is correct
|
||||||
|
|||||||
Reference in New Issue
Block a user