Skip to content

Commit

Permalink
[IR] add testdata for dumpKotlinLike
Browse files Browse the repository at this point in the history
  • Loading branch information
bashor authored and teamcityserver committed Nov 25, 2020
1 parent d2022ab commit 8d5facb
Show file tree
Hide file tree
Showing 365 changed files with 15,516 additions and 0 deletions.
34 changes: 34 additions & 0 deletions compiler/testData/ir/irText/classes/abstractMembers.kt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
abstract class AbstractClass {
constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */

}

abstract fun abstractFun()
abstract val abstractVal: Int
abstract get

abstract var abstractVar: Int
abstract get
abstract set




}

interface Interface {
abstract fun abstractFun()
abstract val abstractVal: Int
abstract get

abstract var abstractVar: Int
abstract get
abstract set




}

44 changes: 44 additions & 0 deletions compiler/testData/ir/irText/classes/annotationClasses.kt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
annotation class Test1 : Annotation {
constructor(x: Int) /* primary */
val x: Int
field = x
get




}

annotation class Test2 : Annotation {
constructor(x: Int = 0) /* primary */
val x: Int
field = x
get




}

annotation class Test3 : Annotation {
constructor(x: Test1) /* primary */
val x: Test1
field = x
get




}

annotation class Test4 : Annotation {
constructor(vararg xs: Int) /* primary */
val xs: IntArray
field = xs
get




}

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
open class Base {
constructor(x: Int, y: Int) /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */

}

val x: Int
field = x
get

val y: Int
field = y
get




}

class Test1 : Base {
constructor(xx: Int, yy: Int) /* primary */ {
{ //BLOCK
TODO("IrDelegatingConstructorCall")
}
/* InstanceInitializerCall */

}




}

class Test2 : Base {
constructor(xx: Int, yy: Int) {
{ //BLOCK
TODO("IrDelegatingConstructorCall")
}
/* InstanceInitializerCall */

}

constructor(xxx: Int, yyy: Int, a: Any) {
{ //BLOCK
TODO("IrDelegatingConstructorCall")
}
}




}

93 changes: 93 additions & 0 deletions compiler/testData/ir/irText/classes/classMembers.kt.txt
Original file line number Diff line number Diff line change
@@ -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 */

}




}




}

57 changes: 57 additions & 0 deletions compiler/testData/ir/irText/classes/classes.kt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
class TestClass {
constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */

}




}

interface TestInterface {



}

object TestObject {
private constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */

}




}

annotation class TestAnnotationClass : Annotation {
constructor() /* primary */



}

enum class TestEnumClass : Enum<TestEnumClass> {
private constructor() /* primary */ {
TODO("IrEnumConstructorCall")
/* InstanceInitializerCall */

}








fun values(): Array<TestEnumClass> /* Synthetic body for ENUM_VALUES */

fun valueOf(value: String): TestEnumClass /* Synthetic body for ENUM_VALUEOF */

}

48 changes: 48 additions & 0 deletions compiler/testData/ir/irText/classes/companionObject.kt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
class Test1 {
constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */

}

companion object Companion {
private constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */

}




}




}

class Test2 {
constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */

}

companion object Named {
private constructor() /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */

}




}




}

Loading

0 comments on commit 8d5facb

Please sign in to comment.