KT-11588 Type aliases
Type alias constructor
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
class C<T>(val x: T, val y: String) {
|
||||
constructor(x: T): this(x, "")
|
||||
}
|
||||
|
||||
typealias GTC<T> = C<T>
|
||||
|
||||
val test1 = GTC<String>("", "")
|
||||
val test2 = GTC<String>("", "")
|
||||
val test3 = GTC<String>("")
|
||||
val test4 = GTC<String>("")
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package
|
||||
|
||||
public typealias GTC</*0*/ T> = C<T>
|
||||
public val test1: C<kotlin.String>
|
||||
public val test2: C<kotlin.String>
|
||||
public val test3: C<kotlin.String>
|
||||
public val test4: C<kotlin.String>
|
||||
|
||||
public final class C</*0*/ T> {
|
||||
public constructor C</*0*/ T>(/*0*/ x: T)
|
||||
public constructor C</*0*/ T>(/*0*/ x: T, /*1*/ y: kotlin.String)
|
||||
public final val x: T
|
||||
public final val y: kotlin.String
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class C(val x: String) {
|
||||
constructor(): this("")
|
||||
}
|
||||
|
||||
typealias TC = C
|
||||
|
||||
val test1: C = TC("")
|
||||
val test2: TC = TC("")
|
||||
val test3: C = TC()
|
||||
val test4: TC = TC()
|
||||
@@ -0,0 +1,16 @@
|
||||
package
|
||||
|
||||
public typealias TC = C
|
||||
public val test1: C
|
||||
public val test2: TC [= C]
|
||||
public val test3: C
|
||||
public val test4: TC [= C]
|
||||
|
||||
public final class C {
|
||||
public constructor C()
|
||||
public constructor C(/*0*/ x: kotlin.String)
|
||||
public final val x: kotlin.String
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user