Alphabetical sort wrapped intersection types for rendered diagnostics
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package
|
package
|
||||||
|
|
||||||
public fun bar(/*0*/ b: B): kotlin.String
|
public fun bar(/*0*/ b: B): kotlin.String
|
||||||
public fun foo(/*0*/ b: B): {A & C & B}?
|
public fun foo(/*0*/ b: B): {A & B & C}?
|
||||||
public fun gav(/*0*/ b: B): A?
|
public fun gav(/*0*/ b: B): A?
|
||||||
|
|
||||||
public interface A {
|
public interface A {
|
||||||
@@ -25,10 +25,10 @@ public interface C {
|
|||||||
|
|
||||||
public final class My {
|
public final class My {
|
||||||
public constructor My(/*0*/ b: B)
|
public constructor My(/*0*/ b: B)
|
||||||
public final val x: {A & C & B}?
|
public final val x: {A & B & C}?
|
||||||
public final val y: C?
|
public final val y: C?
|
||||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
public final fun foo(/*0*/ b: B): {A & C & B}?
|
public final fun foo(/*0*/ b: B): {A & B & C}?
|
||||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class IntersectionTypeConstructor(typesToIntersect: Collection<KotlinType>) : Ty
|
|||||||
makeDebugNameForIntersectionType(intersectedTypes)
|
makeDebugNameForIntersectionType(intersectedTypes)
|
||||||
|
|
||||||
private fun makeDebugNameForIntersectionType(resultingTypes: Iterable<KotlinType>): String =
|
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 {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
|||||||
Reference in New Issue
Block a user