-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IR] add testdata for dumpKotlinLike
- Loading branch information
Showing
365 changed files
with
15,516 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
compiler/testData/ir/irText/classes/abstractMembers.kt.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
44
compiler/testData/ir/irText/classes/annotationClasses.kt.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
||
|
||
|
||
} | ||
|
54 changes: 54 additions & 0 deletions
54
compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.kt.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ | ||
|
||
} | ||
|
||
|
||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
48
compiler/testData/ir/irText/classes/companionObject.kt.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */ | ||
|
||
} | ||
|
||
|
||
|
||
|
||
} | ||
|
||
|
||
|
||
|
||
} | ||
|
Oops, something went wrong.