KT-11588 Type aliases
Type alias companion object
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
object AnObject {
|
||||
val ok = "OK"
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
typealias GenericTestObject<T> = AnObject
|
||||
|
||||
val test11: AnObject = GenericTestObject
|
||||
val test12: GenericTestObject<*> = GenericTestObject
|
||||
val test13: String = GenericTestObject.ok
|
||||
val test14: String = GenericTestObject.foo()
|
||||
|
||||
class GenericClassWithCompanion<T> {
|
||||
companion object {
|
||||
val ok = "OK"
|
||||
fun foo() = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
typealias TestGCWC<T> = GenericClassWithCompanion<T>
|
||||
|
||||
val test25: GenericClassWithCompanion.Companion = TestGCWC
|
||||
val test26 = TestGCWC
|
||||
val test27: String = TestGCWC.ok
|
||||
val test28: String = TestGCWC.foo()
|
||||
@@ -0,0 +1,37 @@
|
||||
package
|
||||
|
||||
public typealias GenericTestObject</*0*/ T> = AnObject
|
||||
public typealias TestGCWC</*0*/ T> = GenericClassWithCompanion<T>
|
||||
public val test11: AnObject
|
||||
public val test12: GenericTestObject<*> [= AnObject]
|
||||
public val test13: kotlin.String = "OK"
|
||||
public val test14: kotlin.String
|
||||
public val test25: GenericClassWithCompanion.Companion
|
||||
public val test26: GenericClassWithCompanion.Companion
|
||||
public val test27: kotlin.String = "OK"
|
||||
public val test28: kotlin.String
|
||||
|
||||
public object AnObject {
|
||||
private constructor AnObject()
|
||||
public final val ok: kotlin.String = "OK"
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class GenericClassWithCompanion</*0*/ T> {
|
||||
public constructor GenericClassWithCompanion</*0*/ T>()
|
||||
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
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public final val ok: kotlin.String = "OK"
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
object AnObject {
|
||||
val ok = "OK"
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
typealias TestObject = AnObject
|
||||
|
||||
val test11: AnObject = TestObject
|
||||
val test12: TestObject = TestObject
|
||||
val test13: String = TestObject.ok
|
||||
val test14: String = TestObject.foo()
|
||||
|
||||
typealias TestObject2 = TestObject
|
||||
|
||||
val test21: AnObject = TestObject2
|
||||
val test22: TestObject2 = TestObject2
|
||||
val test23: String = TestObject2.ok
|
||||
val test24: String = TestObject2.foo()
|
||||
|
||||
class ClassWithCompanion {
|
||||
companion object {
|
||||
val ok = "OK"
|
||||
fun foo() = "OK"
|
||||
}
|
||||
}
|
||||
|
||||
typealias TestCWC = ClassWithCompanion
|
||||
|
||||
val test35: ClassWithCompanion.Companion = TestCWC
|
||||
val test36 = TestCWC
|
||||
val test37: String = TestCWC.ok
|
||||
val test38: String = TestCWC.foo()
|
||||
@@ -0,0 +1,42 @@
|
||||
package
|
||||
|
||||
public typealias TestCWC = ClassWithCompanion
|
||||
public typealias TestObject = AnObject
|
||||
public typealias TestObject2 = TestObject
|
||||
public val test11: AnObject
|
||||
public val test12: TestObject [= AnObject]
|
||||
public val test13: kotlin.String = "OK"
|
||||
public val test14: kotlin.String
|
||||
public val test21: AnObject
|
||||
public val test22: TestObject2 [= AnObject]
|
||||
public val test23: kotlin.String = "OK"
|
||||
public val test24: kotlin.String
|
||||
public val test35: ClassWithCompanion.Companion
|
||||
public val test36: ClassWithCompanion.Companion
|
||||
public val test37: kotlin.String = "OK"
|
||||
public val test38: kotlin.String
|
||||
|
||||
public object AnObject {
|
||||
private constructor AnObject()
|
||||
public final val ok: kotlin.String = "OK"
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class ClassWithCompanion {
|
||||
public constructor ClassWithCompanion()
|
||||
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
|
||||
|
||||
public companion object Companion {
|
||||
private constructor Companion()
|
||||
public final val ok: kotlin.String = "OK"
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(): kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user