Files
kotlin-fork/compiler/testData/ir/irText/declarations/parameters/constructor.kt.txt
T
Dmitriy Novozhilov b454fcc1e0 [FIR] Save IR dumps to .ir.txt files instead of .txt in tests
This is needed to avoid clashes between different dumps from different
  handlers
2021-10-12 17:26:36 +03:00

81 lines
1015 B
Kotlin
Vendored

class Test1<T1 : Any?, T2 : Any?> {
constructor(x: T1, y: T2) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: T1
field = x
get
val y: T2
field = y
get
}
class Test2 {
constructor(x: Int, y: String) /* primary */ {
super/*Any*/()
/* <init>() */
}
val y: String
field = y
get
inner class TestInner<Z : Any?> {
constructor(z: Z) /* primary */ {
super/*Any*/()
/* <init>() */
}
val z: Z
field = z
get
constructor(z: Z, i: Int) {
<this>.this/*TestInner*/<Z>(z = z)
}
}
}
class Test3 {
constructor(x: Int, y: String = "") /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = x
get
val y: String
field = y
get
}
class Test4<T : Any?> {
constructor(x: Int) /* primary */ {
super/*Any*/()
/* <init>() */
}
val x: Int
field = x
get
constructor(x: Int, y: Int = 42) {
this/*Test4*/<T>(x = x.plus(other = y))
}
}