Alphabetical sort wrapped intersection types for rendered diagnostics

This commit is contained in:
victor.petukhov
2018-12-28 14:54:11 +03:00
parent 30762a450a
commit cb5f497cbe
2 changed files with 4 additions and 4 deletions
@@ -51,7 +51,7 @@ class IntersectionTypeConstructor(typesToIntersect: Collection<KotlinType>) : Ty
makeDebugNameForIntersectionType(intersectedTypes)
private fun makeDebugNameForIntersectionType(resultingTypes: Iterable<KotlinType>): String =
resultingTypes.joinToString(separator = " & ", prefix = "{", postfix = "}")
resultingTypes.sortedBy { it.toString() }.joinToString(separator = " & ", prefix = "{", postfix = "}")
override fun equals(other: Any?): Boolean {
if (this === other) return true