[IR] update testdata: better support for IrEnumConstructorCall and IrEnumEntry

This commit is contained in:
Zalim Bashorov
2020-11-06 03:23:26 +03:00
committed by teamcityserver
parent 602f0ddbc8
commit 5500b014f5
18 changed files with 352 additions and 70 deletions
@@ -1,11 +1,65 @@
open enum class MyEnum : Enum<MyEnum> {
private constructor() /* primary */ {
TODO("IrEnumConstructorCall")
super/*Enum*/<MyEnum>()
/* InstanceInitializerCall */
}
Z init = TODO("IrEnumConstructorCall")
Z = Z()
private enum entry class Z : MyEnum {
private constructor() /* primary */ {
super/*MyEnum*/() /*~> Unit */
/* InstanceInitializerCall */
}
var counter: Int
field = 0
get
set
fun foo() {
}
fun bar() {
<this>.<set-counter>(<set-?> = 1)
<this>.foo()
}
val aLambda: Function0<Unit>
field = local fun <anonymous>() {
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
get
val anObject: Any
field = { // BLOCK
local class <no name provided> {
constructor() /* primary */ {
super/*Any*/()
/* InstanceInitializerCall */
}
init {
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
fun test() {
Z.<set-counter>(<set-?> = 1)
Z.foo()
}
}
<no name provided>()
}
get
}
fun values(): Array<MyEnum> /* Synthetic body for ENUM_VALUES */