[IR] add testdata for dumpKotlinLike
This commit is contained in:
committed by
teamcityserver
parent
d2022ab115
commit
8d5facb15f
@@ -0,0 +1,93 @@
|
||||
class C {
|
||||
constructor(x: Int, y: Int, z: Int = 1) /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
val y: Int
|
||||
field = y
|
||||
get
|
||||
|
||||
var z: Int
|
||||
field = z
|
||||
get
|
||||
set
|
||||
|
||||
constructor() {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
}
|
||||
|
||||
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 */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
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 */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user