Files
kotlin-fork/compiler/testData/ir/irText/classes/classMembers.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
1.1 KiB
Plaintext
Vendored

class C {
constructor(x: Int, y: Int, z: Int = 1) /* primary */ {
super/*Any*/()
/* <init>() */
}
val y: Int
field = y
get
var z: Int
field = z
get
set
constructor() {
this/*C*/(x = 0, y = 0, z = 0)
}
val property: Int
field = 0
get
val propertyWithGet: Int
get(): Int {
return 42
}
var propertyWithGetAndSet: Int
get(): Int {
return <this>.<get-z>()
}
set(value: Int) {
<this>.<set-z>(<set-?> = value)
}
fun function() {
println(message = "1")
}
fun Int.memberExtensionFunction() {
println(message = "2")
}
class NestedClass {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
fun function() {
println(message = "3")
}
fun Int.memberExtensionFunction() {
println(message = "4")
}
}
interface NestedInterface {
abstract fun foo()
fun bar() {
return <this>.foo()
}
}
companion object Companion {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
}
}