[IR] add testdata for dumpKotlinLike
This commit is contained in:
committed by
teamcityserver
parent
d2022ab115
commit
8d5facb15f
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
annotation class A1 : Annotation {
|
||||
constructor(x: Int) /* primary */
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
annotation class A2 : Annotation {
|
||||
constructor(a: A1) /* primary */
|
||||
val a: A1
|
||||
field = a
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
annotation class AA : Annotation {
|
||||
constructor(xs: Array<A1>) /* primary */
|
||||
val xs: Array<A1>
|
||||
field = xs
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@A2(...)
|
||||
@AA(...)
|
||||
fun test() {
|
||||
}
|
||||
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String = "", y: Int = 42) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: Int
|
||||
field = y
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test2() {
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test3() {
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test4() {
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test5() {
|
||||
}
|
||||
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(vararg xs: String) /* primary */
|
||||
val xs: Array<out String>
|
||||
field = xs
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test2() {
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test3() {
|
||||
}
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
annotation class TestAnnWithIntArray : Annotation {
|
||||
constructor(x: IntArray) /* primary */
|
||||
val x: IntArray
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
annotation class TestAnnWithStringArray : Annotation {
|
||||
constructor(x: Array<String>) /* primary */
|
||||
val x: Array<String>
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnnWithIntArray(...)
|
||||
@TestAnnWithStringArray(...)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@TestAnnWithIntArray(...)
|
||||
@TestAnnWithStringArray(...)
|
||||
fun test2() {
|
||||
}
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(klass: KClass<*>) /* primary */
|
||||
val klass: KClass<*>
|
||||
field = klass
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
class C {
|
||||
constructor() /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
class TestClass {
|
||||
constructor() /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
interface TestInterface {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
object TestObject {
|
||||
private constructor() /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
class Host {
|
||||
constructor() /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
companion object TestCompanion {
|
||||
private constructor() /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
enum class TestEnum : Enum<TestEnum> {
|
||||
private constructor() /* primary */ {
|
||||
TODO("IrEnumConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fun values(): Array<TestEnum> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
annotation class TestAnnotation : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
const val ONE: Int
|
||||
field = 1
|
||||
get
|
||||
|
||||
annotation class A : Annotation {
|
||||
constructor(x: Int) /* primary */
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test2() {
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: Int) /* primary */
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
class TestClass {
|
||||
@TestAnn(...)
|
||||
constructor() /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
constructor(x: Int) {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
annotation class Ann : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
val test1: Int /* by */
|
||||
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
get(): Int {
|
||||
return getValue<Int>($receiver = #test1$delegate, thisRef = null, property = ::test1)
|
||||
}
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
class Cell {
|
||||
constructor(value: Int) /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
var value: Int
|
||||
field = value
|
||||
get
|
||||
set
|
||||
|
||||
operator fun getValue(thisRef: Any?, kProp: Any?): Int {
|
||||
return <this>.<get-value>()
|
||||
}
|
||||
|
||||
operator fun setValue(thisRef: Any?, kProp: Any?, newValue: Int) {
|
||||
<this>.<set-value>(<set-?> = newValue)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
val test1: Int /* by */
|
||||
field = TODO("IrConstructorCall")
|
||||
@A(...)
|
||||
get(): Int {
|
||||
return #test1$delegate.getValue(thisRef = null, kProp = ::test1)
|
||||
}
|
||||
|
||||
var test2: Int /* by */
|
||||
field = TODO("IrConstructorCall")
|
||||
@A(...)
|
||||
get(): Int {
|
||||
return #test2$delegate.getValue(thisRef = null, kProp = ::test2)
|
||||
}
|
||||
@A(...)
|
||||
set(<set-?>: Int) {
|
||||
return #test2$delegate.setValue(thisRef = null, kProp = ::test2, newValue = <set-?>)
|
||||
}
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
open enum class TestEnum : Enum<TestEnum> {
|
||||
private constructor() /* primary */ {
|
||||
TODO("IrEnumConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
ENTRY1 init = TODO("IrEnumConstructorCall") @TestAnn(...)
|
||||
ENTRY2 init = TODO("IrEnumConstructorCall")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fun values(): Array<TestEnum> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
enum class En : Enum<En> {
|
||||
private constructor() /* primary */ {
|
||||
TODO("IrEnumConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
A init = TODO("IrEnumConstructorCall") B init = TODO("IrEnumConstructorCall") C init = TODO("IrEnumConstructorCall") D init = TODO("IrEnumConstructorCall")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fun values(): Array<En> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): En /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: En) /* primary */
|
||||
val x: En
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
val testVal: String
|
||||
field = "a val"
|
||||
get
|
||||
|
||||
var testVar: String
|
||||
field = "a var"
|
||||
get
|
||||
set
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
@file:A(...)
|
||||
package test
|
||||
|
||||
@Target(...)
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: Int) /* primary */
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
fun testSimpleFunction() {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
@JavaAnn(...)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@JavaAnn(...)
|
||||
fun test2() {
|
||||
}
|
||||
|
||||
@JavaAnn(...)
|
||||
fun test3() {
|
||||
}
|
||||
|
||||
Vendored
+25
@@ -0,0 +1,25 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun foo(m: Map<String, Int>) {
|
||||
@A(...)
|
||||
val test: Int
|
||||
val test$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
local get(): Int {
|
||||
return getValue<Int>($receiver = test$delegate, thisRef = null, property = ::test)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
annotation class A1 : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
annotation class A2 : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
annotation class A3 : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@A1
|
||||
@A2
|
||||
@A3
|
||||
fun test() {
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
annotation class Ann : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
class Test {
|
||||
constructor(x: Int) /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
val testVal: String
|
||||
field = ""
|
||||
get
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
class C {
|
||||
constructor(x: Int, y: Int) /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
@A(...)
|
||||
get
|
||||
|
||||
var y: Int
|
||||
field = y
|
||||
@A(...)
|
||||
get
|
||||
@A(...)
|
||||
set
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
val test1: String
|
||||
@TestAnn(...)
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
var test2: String
|
||||
@TestAnn(...)
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
@TestAnn(...)
|
||||
set(value: String) {
|
||||
}
|
||||
|
||||
val test3: String
|
||||
field = ""
|
||||
@TestAnn(...)
|
||||
get
|
||||
|
||||
var test4: String
|
||||
field = ""
|
||||
@TestAnn(...)
|
||||
get
|
||||
@TestAnn(...)
|
||||
set
|
||||
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
annotation class AnnParam : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
var p: Int
|
||||
field = 0
|
||||
get
|
||||
set
|
||||
|
||||
class C {
|
||||
constructor(p: Int) /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
var p: Int
|
||||
field = p
|
||||
get
|
||||
set
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
annotation class Ann : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
class A {
|
||||
constructor() /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
fun String.f(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
val String?.p: String
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun String?.topLevelF(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
val String.topLevelP: String
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(vararg xs: String) /* primary */
|
||||
val xs: Array<out String>
|
||||
field = xs
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@A(...)
|
||||
fun test() {
|
||||
}
|
||||
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
@Target(...)
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(...)
|
||||
typealias TestTypeAlias = String
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
@Target(...)
|
||||
annotation class Anno : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun <@Anno T : Any?> foo() {
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun testFun(x: Int) {
|
||||
}
|
||||
|
||||
class TestClassConstructor1 {
|
||||
constructor(x: Int) /* primary */ {
|
||||
TODO("IrDelegatingConstructorCall")
|
||||
/* InstanceInitializerCall */
|
||||
|
||||
}
|
||||
|
||||
val xx: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
annotation class A1 : Annotation {
|
||||
constructor(vararg xs: Int) /* primary */
|
||||
val xs: IntArray
|
||||
field = xs
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
annotation class A2 : Annotation {
|
||||
constructor(vararg xs: String) /* primary */
|
||||
val xs: Array<out String>
|
||||
field = xs
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
annotation class AA : Annotation {
|
||||
constructor(vararg xs: A1) /* primary */
|
||||
val xs: Array<out A1>
|
||||
field = xs
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@A1(...)
|
||||
@A2(...)
|
||||
@AA(...)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@A1(...)
|
||||
@A2(...)
|
||||
@AA(...)
|
||||
fun test2() {
|
||||
}
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
@TestAnn(...)
|
||||
val testVal: String = "testVal"
|
||||
@TestAnn(...)
|
||||
var testVar: String = "testVar"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user