Files
kotlin-fork/compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.txt
T
Mikhail Glukhikh f6872dfbea Exhaustive when support for sealed classes #KT-7606 Fixed
When on sealed can use is (both for derived classes and objects) or just comparison (only for derived objects).
A pack of tests provided.
2015-06-25 19:07:16 +03:00

59 lines
3.1 KiB
Plaintext
Vendored

package
internal fun foo(/*0*/ s: Sealed): kotlin.Int
internal sealed class Sealed {
public constructor Sealed(/*0*/ x: kotlin.Int)
internal final val x: kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal object First : Sealed {
private constructor First()
internal final override /*1*/ /*fake_override*/ val x: kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
internal open class NonFirst : Sealed {
public constructor NonFirst(/*0*/ tuple: Sealed.Tuple)
internal final override /*1*/ /*fake_override*/ val x: kotlin.Int
internal final val y: kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
internal object Second : Sealed.NonFirst {
private constructor Second()
internal final override /*1*/ /*fake_override*/ val x: kotlin.Int
internal final override /*1*/ /*fake_override*/ val y: kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
internal object Third : Sealed.NonFirst {
private constructor Third()
internal final override /*1*/ /*fake_override*/ val x: kotlin.Int
internal final override /*1*/ /*fake_override*/ val y: kotlin.Int
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}
kotlin.data() internal final class Tuple {
public constructor Tuple(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int)
internal final val x: kotlin.Int
internal final val y: kotlin.Int
internal final /*synthesized*/ fun component1(): kotlin.Int
internal final /*synthesized*/ fun component2(): kotlin.Int
public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.Int = ...): Sealed.Tuple
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
}