[IR] dumpKotlinLike: add testdata for FIR tests
This commit is contained in:
committed by
teamcityserver
parent
d7bd4240e1
commit
c68040753d
@@ -0,0 +1,31 @@
|
||||
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
|
||||
|
||||
}
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
open class Base {
|
||||
constructor(x: Int, y: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: Int
|
||||
field = y
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class Test1 : Base {
|
||||
constructor(xx: Int, yy: Int) /* primary */ {
|
||||
{ // BLOCK
|
||||
super/*Base*/(x = xx, y = yy)
|
||||
}
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Test2 : Base {
|
||||
constructor(xx: Int, yy: Int) {
|
||||
{ // BLOCK
|
||||
super/*Base*/(x = xx, y = yy)
|
||||
}
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
constructor(xxx: Int, yyy: Int, a: Any) {
|
||||
{ // BLOCK
|
||||
this/*Test2*/(xx = xxx, yy = yyy)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
class TestClass {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface TestInterface {
|
||||
|
||||
}
|
||||
|
||||
object TestObject {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
annotation class TestAnnotationClass : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
enum class TestEnumClass : Enum<TestEnumClass> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestEnumClass>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
fun values(): Array<TestEnumClass> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnumClass /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
class A : Cloneable {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface I : Cloneable {
|
||||
|
||||
}
|
||||
|
||||
class C : I {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class OC : I {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
protected override fun clone(): OC {
|
||||
return OC()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
data class Test1 {
|
||||
constructor(stringArray: Array<String>, charArray: CharArray, booleanArray: BooleanArray, byteArray: ByteArray, shortArray: ShortArray, intArray: IntArray, longArray: LongArray, floatArray: FloatArray, doubleArray: DoubleArray) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val stringArray: Array<String>
|
||||
field = stringArray
|
||||
get
|
||||
|
||||
val charArray: CharArray
|
||||
field = charArray
|
||||
get
|
||||
|
||||
val booleanArray: BooleanArray
|
||||
field = booleanArray
|
||||
get
|
||||
|
||||
val byteArray: ByteArray
|
||||
field = byteArray
|
||||
get
|
||||
|
||||
val shortArray: ShortArray
|
||||
field = shortArray
|
||||
get
|
||||
|
||||
val intArray: IntArray
|
||||
field = intArray
|
||||
get
|
||||
|
||||
val longArray: LongArray
|
||||
field = longArray
|
||||
get
|
||||
|
||||
val floatArray: FloatArray
|
||||
field = floatArray
|
||||
get
|
||||
|
||||
val doubleArray: DoubleArray
|
||||
field = doubleArray
|
||||
get
|
||||
|
||||
fun component1(): Array<String> {
|
||||
return <this>.#stringArray
|
||||
}
|
||||
|
||||
fun component2(): CharArray {
|
||||
return <this>.#charArray
|
||||
}
|
||||
|
||||
fun component3(): BooleanArray {
|
||||
return <this>.#booleanArray
|
||||
}
|
||||
|
||||
fun component4(): ByteArray {
|
||||
return <this>.#byteArray
|
||||
}
|
||||
|
||||
fun component5(): ShortArray {
|
||||
return <this>.#shortArray
|
||||
}
|
||||
|
||||
fun component6(): IntArray {
|
||||
return <this>.#intArray
|
||||
}
|
||||
|
||||
fun component7(): LongArray {
|
||||
return <this>.#longArray
|
||||
}
|
||||
|
||||
fun component8(): FloatArray {
|
||||
return <this>.#floatArray
|
||||
}
|
||||
|
||||
fun component9(): DoubleArray {
|
||||
return <this>.#doubleArray
|
||||
}
|
||||
|
||||
fun copy(stringArray: Array<String> = <this>.#stringArray, charArray: CharArray = <this>.#charArray, booleanArray: BooleanArray = <this>.#booleanArray, byteArray: ByteArray = <this>.#byteArray, shortArray: ShortArray = <this>.#shortArray, intArray: IntArray = <this>.#intArray, longArray: LongArray = <this>.#longArray, floatArray: FloatArray = <this>.#floatArray, doubleArray: DoubleArray = <this>.#doubleArray): Test1 {
|
||||
return Test1(stringArray = stringArray, charArray = charArray, booleanArray = booleanArray, byteArray = byteArray, shortArray = shortArray, intArray = intArray, longArray = longArray, floatArray = floatArray, doubleArray = doubleArray)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test1 -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test1 = other as Test1
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#stringArray, arg1 = tmp0_other_with_cast.#stringArray).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#charArray, arg1 = tmp0_other_with_cast.#charArray).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#booleanArray, arg1 = tmp0_other_with_cast.#booleanArray).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#byteArray, arg1 = tmp0_other_with_cast.#byteArray).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#shortArray, arg1 = tmp0_other_with_cast.#shortArray).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#intArray, arg1 = tmp0_other_with_cast.#intArray).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#longArray, arg1 = tmp0_other_with_cast.#longArray).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#floatArray, arg1 = tmp0_other_with_cast.#floatArray).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#doubleArray, arg1 = tmp0_other_with_cast.#doubleArray).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = dataClassArrayMemberHashCode(arg0 = <this>.#stringArray)
|
||||
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = <this>.#charArray))
|
||||
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = <this>.#booleanArray))
|
||||
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = <this>.#byteArray))
|
||||
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = <this>.#shortArray))
|
||||
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = <this>.#intArray))
|
||||
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = <this>.#longArray))
|
||||
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = <this>.#floatArray))
|
||||
result = result.times(other = 31).plus(other = dataClassArrayMemberHashCode(arg0 = <this>.#doubleArray))
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test1(" + "stringArray=" + dataClassArrayMemberToString(arg0 = <this>.#stringArray) + ", " + "charArray=" + dataClassArrayMemberToString(arg0 = <this>.#charArray) + ", " + "booleanArray=" + dataClassArrayMemberToString(arg0 = <this>.#booleanArray) + ", " + "byteArray=" + dataClassArrayMemberToString(arg0 = <this>.#byteArray) + ", " + "shortArray=" + dataClassArrayMemberToString(arg0 = <this>.#shortArray) + ", " + "intArray=" + dataClassArrayMemberToString(arg0 = <this>.#intArray) + ", " + "longArray=" + dataClassArrayMemberToString(arg0 = <this>.#longArray) + ", " + "floatArray=" + dataClassArrayMemberToString(arg0 = <this>.#floatArray) + ", " + "doubleArray=" + dataClassArrayMemberToString(arg0 = <this>.#doubleArray) + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test2<T : Any?> {
|
||||
constructor(genericArray: Array<T>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val genericArray: Array<T>
|
||||
field = genericArray
|
||||
get
|
||||
|
||||
fun component1(): Array<T> {
|
||||
return <this>.#genericArray
|
||||
}
|
||||
|
||||
fun copy(genericArray: Array<T> = <this>.#genericArray): Test2<T> {
|
||||
return Test2<Any>(genericArray = genericArray)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test2<T> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test2<T> = other as Test2<T>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#genericArray, arg1 = tmp0_other_with_cast.#genericArray).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return dataClassArrayMemberHashCode(arg0 = <this>.#genericArray)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test2(" + "genericArray=" + dataClassArrayMemberToString(arg0 = <this>.#genericArray) + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test3 {
|
||||
constructor(anyArrayN: Array<Any>?) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val anyArrayN: Array<Any>?
|
||||
field = anyArrayN
|
||||
get
|
||||
|
||||
fun component1(): Array<Any>? {
|
||||
return <this>.#anyArrayN
|
||||
}
|
||||
|
||||
fun copy(anyArrayN: Array<Any>? = <this>.#anyArrayN): Test3 {
|
||||
return Test3(anyArrayN = anyArrayN)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test3 -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test3 = other as Test3
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#anyArrayN, arg1 = tmp0_other_with_cast.#anyArrayN).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return when {
|
||||
EQEQ(arg0 = <this>.#anyArrayN, arg1 = null) -> 0
|
||||
else -> dataClassArrayMemberHashCode(arg0 = <this>.#anyArrayN)
|
||||
}
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test3(" + "anyArrayN=" + dataClassArrayMemberToString(arg0 = <this>.#anyArrayN) + ")"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
data class Test1 {
|
||||
constructor(x: Int, y: String, z: Any) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: String
|
||||
field = y
|
||||
get
|
||||
|
||||
val z: Any
|
||||
field = z
|
||||
get
|
||||
|
||||
fun component1(): Int {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
fun component2(): String {
|
||||
return <this>.#y
|
||||
}
|
||||
|
||||
fun component3(): Any {
|
||||
return <this>.#z
|
||||
}
|
||||
|
||||
fun copy(x: Int = <this>.#x, y: String = <this>.#y, z: Any = <this>.#z): Test1 {
|
||||
return Test1(x = x, y = y, z = z)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test1 -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test1 = other as Test1
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#y, arg1 = tmp0_other_with_cast.#y).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#z, arg1 = tmp0_other_with_cast.#z).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = <this>.#x.hashCode()
|
||||
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
|
||||
result = result.times(other = 31).plus(other = <this>.#z.hashCode())
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test1(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ", " + "z=" + <this>.#z + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test2 {
|
||||
constructor(x: Any?) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Any?
|
||||
field = x
|
||||
get
|
||||
|
||||
fun component1(): Any? {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
fun copy(x: Any? = <this>.#x): Test2 {
|
||||
return Test2(x = x)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test2 -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test2 = other as Test2
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
|
||||
else -> <this>.#x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test2(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test3 {
|
||||
constructor(d: Double, dn: Double?, f: Float, df: Float?) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val d: Double
|
||||
field = d
|
||||
get
|
||||
|
||||
val dn: Double?
|
||||
field = dn
|
||||
get
|
||||
|
||||
val f: Float
|
||||
field = f
|
||||
get
|
||||
|
||||
val df: Float?
|
||||
field = df
|
||||
get
|
||||
|
||||
fun component1(): Double {
|
||||
return <this>.#d
|
||||
}
|
||||
|
||||
fun component2(): Double? {
|
||||
return <this>.#dn
|
||||
}
|
||||
|
||||
fun component3(): Float {
|
||||
return <this>.#f
|
||||
}
|
||||
|
||||
fun component4(): Float? {
|
||||
return <this>.#df
|
||||
}
|
||||
|
||||
fun copy(d: Double = <this>.#d, dn: Double? = <this>.#dn, f: Float = <this>.#f, df: Float? = <this>.#df): Test3 {
|
||||
return Test3(d = d, dn = dn, f = f, df = df)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test3 -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test3 = other as Test3
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#d, arg1 = tmp0_other_with_cast.#d).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#dn, arg1 = tmp0_other_with_cast.#dn).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#f, arg1 = tmp0_other_with_cast.#f).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#df, arg1 = tmp0_other_with_cast.#df).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = <this>.#d.hashCode()
|
||||
result = result.times(other = 31).plus(other = when {
|
||||
EQEQ(arg0 = <this>.#dn, arg1 = null) -> 0
|
||||
else -> <this>.#dn.hashCode()
|
||||
})
|
||||
result = result.times(other = 31).plus(other = <this>.#f.hashCode())
|
||||
result = result.times(other = 31).plus(other = when {
|
||||
EQEQ(arg0 = <this>.#df, arg1 = null) -> 0
|
||||
else -> <this>.#df.hashCode()
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test3(" + "d=" + <this>.#d + ", " + "dn=" + <this>.#dn + ", " + "f=" + <this>.#f + ", " + "df=" + <this>.#df + ")"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
data class Test1<T : Any?> {
|
||||
constructor(x: T) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: T
|
||||
field = x
|
||||
get
|
||||
|
||||
fun component1(): T {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
fun copy(x: T = <this>.#x): Test1<T> {
|
||||
return Test1<Any>(x = x)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test1<T> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test1<T> = other as Test1<T>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
|
||||
else -> <this>.#x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test1(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test2<T : Number> {
|
||||
constructor(x: T) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: T
|
||||
field = x
|
||||
get
|
||||
|
||||
fun component1(): T {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
fun copy(x: T = <this>.#x): Test2<T> {
|
||||
return Test2<Any>(x = x)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test2<T> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test2<T> = other as Test2<T>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#x.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test2(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test3<T : Any?> {
|
||||
constructor(x: List<T>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: List<T>
|
||||
field = x
|
||||
get
|
||||
|
||||
fun component1(): List<T> {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
fun copy(x: List<T> = <this>.#x): Test3<T> {
|
||||
return Test3<Any>(x = x)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test3<T> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test3<T> = other as Test3<T>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#x.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test3(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class Test4 {
|
||||
constructor(x: List<String>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: List<String>
|
||||
field = x
|
||||
get
|
||||
|
||||
fun component1(): List<String> {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
fun copy(x: List<String> = <this>.#x): Test4 {
|
||||
return Test4(x = x)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test4 -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test4 = other as Test4
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#x.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test4(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
interface IBase<A : Any?> {
|
||||
abstract fun <B : Any?> foo(a: A, b: B)
|
||||
abstract val <C : Any?> C.id: Map<A, C>?
|
||||
abstract get
|
||||
|
||||
abstract var <D : Any?> List<D>.x: D?
|
||||
abstract get
|
||||
abstract set
|
||||
|
||||
}
|
||||
|
||||
class Test1<E : Any?> : IBase<E> {
|
||||
constructor(i: IBase<E>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = i
|
||||
}
|
||||
|
||||
override fun <B : Any?> foo(a: E, b: B) {
|
||||
<this>.#<$$delegate_0>.foo</* null */>(a = a, b = b)
|
||||
}
|
||||
|
||||
override val <C : Any?> C.id: Map<E, C>?
|
||||
override get(): Map<E, C>? {
|
||||
return (<this>.#<$$delegate_0>, <this>).<get-id></* null */>()
|
||||
}
|
||||
|
||||
override var <D : Any?> List<D>.x: D?
|
||||
override get(): D? {
|
||||
return (<this>.#<$$delegate_0>, <this>).<get-x></* null */>()
|
||||
}
|
||||
override set(<set-?>: D?) {
|
||||
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IBase<E>
|
||||
|
||||
}
|
||||
|
||||
class Test2 : IBase<String> {
|
||||
constructor(j: IBase<String>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = j
|
||||
}
|
||||
|
||||
var j: IBase<String>
|
||||
field = j
|
||||
get
|
||||
set
|
||||
|
||||
override fun <B : Any?> foo(a: String, b: B) {
|
||||
<this>.#<$$delegate_0>.foo</* null */>(a = a, b = b)
|
||||
}
|
||||
|
||||
override val <C : Any?> C.id: Map<String, C>?
|
||||
override get(): Map<String, C>? {
|
||||
return (<this>.#<$$delegate_0>, <this>).<get-id></* null */>()
|
||||
}
|
||||
|
||||
override var <D : Any?> List<D>.x: D?
|
||||
override get(): D? {
|
||||
return (<this>.#<$$delegate_0>, <this>).<get-x></* null */>()
|
||||
}
|
||||
override set(<set-?>: D?) {
|
||||
(<this>.#<$$delegate_0>, <this>).<set-x></* null */>(<set-?> = <set-?>)
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IBase<String>
|
||||
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
interface IBase {
|
||||
abstract fun foo(x: Int, s: String)
|
||||
abstract fun bar(): Int
|
||||
abstract fun String.qux()
|
||||
|
||||
}
|
||||
|
||||
object BaseImpl : IBase {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo(x: Int, s: String) {
|
||||
}
|
||||
|
||||
override fun bar(): Int {
|
||||
return 42
|
||||
}
|
||||
|
||||
override fun String.qux() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface IOther {
|
||||
abstract val x: String
|
||||
abstract get
|
||||
|
||||
abstract var y: Int
|
||||
abstract get
|
||||
abstract set
|
||||
|
||||
abstract val Byte.z1: Int
|
||||
abstract get
|
||||
|
||||
abstract var Byte.z2: Int
|
||||
abstract get
|
||||
abstract set
|
||||
|
||||
}
|
||||
|
||||
fun otherImpl(x0: String, y0: Int): IOther {
|
||||
return { // BLOCK
|
||||
local class <no name provided> : IOther {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override val x: String
|
||||
field = x0
|
||||
override get
|
||||
|
||||
override var y: Int
|
||||
field = y0
|
||||
override get
|
||||
override set
|
||||
|
||||
override val Byte.z1: Int
|
||||
override get(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
override var Byte.z2: Int
|
||||
override get(): Int {
|
||||
return 2
|
||||
}
|
||||
override set(value: Int) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}
|
||||
}
|
||||
|
||||
class Test1 : IBase {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = BaseImpl
|
||||
}
|
||||
|
||||
override fun foo(x: Int, s: String) {
|
||||
<this>.#<$$delegate_0>.foo(x = x, s = s)
|
||||
}
|
||||
|
||||
override fun bar(): Int {
|
||||
return <this>.#<$$delegate_0>.bar()
|
||||
}
|
||||
|
||||
override fun String.qux() {
|
||||
(<this>.#<$$delegate_0>, <this>).qux()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IBase
|
||||
|
||||
}
|
||||
|
||||
class Test2 : IBase, IOther {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = BaseImpl
|
||||
<this>.#<$$delegate_1> = otherImpl(x0 = "", y0 = 42)
|
||||
}
|
||||
|
||||
override fun foo(x: Int, s: String) {
|
||||
<this>.#<$$delegate_0>.foo(x = x, s = s)
|
||||
}
|
||||
|
||||
override fun bar(): Int {
|
||||
return <this>.#<$$delegate_0>.bar()
|
||||
}
|
||||
|
||||
override fun String.qux() {
|
||||
(<this>.#<$$delegate_0>, <this>).qux()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IBase
|
||||
override val x: String
|
||||
override get(): String {
|
||||
return <this>.#<$$delegate_1>.<get-x>()
|
||||
}
|
||||
|
||||
override var y: Int
|
||||
override get(): Int {
|
||||
return <this>.#<$$delegate_1>.<get-y>()
|
||||
}
|
||||
override set(<set-?>: Int) {
|
||||
<this>.#<$$delegate_1>.<set-y>(<set-?> = <set-?>)
|
||||
}
|
||||
|
||||
override val Byte.z1: Int
|
||||
override get(): Int {
|
||||
return (<this>.#<$$delegate_1>, <this>).<get-z1>()
|
||||
}
|
||||
|
||||
override var Byte.z2: Int
|
||||
override get(): Int {
|
||||
return (<this>.#<$$delegate_1>, <this>).<get-z2>()
|
||||
}
|
||||
override set(<set-?>: Int) {
|
||||
(<this>.#<$$delegate_1>, <this>).<set-z2>(<set-?> = <set-?>)
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_1>: IOther
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
class Test : J {
|
||||
constructor(j: J) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = j
|
||||
}
|
||||
|
||||
private val j: J
|
||||
field = j
|
||||
private get
|
||||
|
||||
override fun takeNotNull(x: @EnhancedNullability String) {
|
||||
<this>.#<$$delegate_0>.takeNotNull(x = x)
|
||||
}
|
||||
|
||||
override fun takeNullable(x: @FlexibleNullability String?) {
|
||||
<this>.#<$$delegate_0>.takeNullable(x = x)
|
||||
}
|
||||
|
||||
override fun takeFlexible(x: String?) {
|
||||
<this>.#<$$delegate_0>.takeFlexible(x = x)
|
||||
}
|
||||
|
||||
override fun returnNotNull(): @EnhancedNullability String {
|
||||
return <this>.#<$$delegate_0>.returnNotNull()
|
||||
}
|
||||
|
||||
override fun returnNullable(): @FlexibleNullability String? {
|
||||
return <this>.#<$$delegate_0>.returnNullable()
|
||||
}
|
||||
|
||||
override fun returnsFlexible(): String? {
|
||||
return <this>.#<$$delegate_0>.returnsFlexible()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: J
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
interface IFooBar {
|
||||
abstract fun foo()
|
||||
abstract fun bar()
|
||||
|
||||
}
|
||||
|
||||
object FooBarImpl : IFooBar {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
override fun bar() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class C : IFooBar {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = FooBarImpl
|
||||
}
|
||||
|
||||
override fun bar() {
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
<this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IFooBar
|
||||
|
||||
}
|
||||
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
typealias CT<T : Any?> = Cell<T>
|
||||
typealias CStr = Cell<String>
|
||||
open class Cell<T : Any?> {
|
||||
constructor(value: T) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val value: T
|
||||
field = value
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class C1 : Cell<String> {
|
||||
constructor() /* primary */ {
|
||||
super/*Cell*/<String>(value = "O")
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class C2 : Cell<String> {
|
||||
constructor() /* primary */ {
|
||||
super/*Cell*/<String>(value = "K")
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
open class Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Test : Base {
|
||||
constructor() {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
constructor(xx: Int) {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
constructor(xx: Short) {
|
||||
this/*Test*/()
|
||||
}
|
||||
|
||||
}
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
enum class TestEnum1 : Enum<TestEnum1> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestEnum1>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
TEST1 = TestEnum1()
|
||||
|
||||
TEST2 = TestEnum1()
|
||||
|
||||
fun values(): Array<TestEnum1> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum1 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
open enum class TestEnum2 : Enum<TestEnum2> {
|
||||
private constructor(x: Int) /* primary */ {
|
||||
super/*Enum*/<TestEnum2>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
TEST1 = TestEnum2(x = 1)
|
||||
|
||||
TEST2 = TestEnum2(x = 2)
|
||||
|
||||
TEST3 = TestEnum2(x = 3)
|
||||
|
||||
fun values(): Array<TestEnum2> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum2 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
abstract enum class TestEnum3 : Enum<TestEnum3> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestEnum3>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
TEST = TEST()
|
||||
private enum entry class TEST : TestEnum3 {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestEnum3*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
println(message = "Hello, world!")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
abstract fun foo()
|
||||
fun values(): Array<TestEnum3> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum3 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
abstract enum class TestEnum4 : Enum<TestEnum4> {
|
||||
private constructor(x: Int) /* primary */ {
|
||||
super/*Enum*/<TestEnum4>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
TEST1 = TEST1()
|
||||
private enum entry class TEST1 : TestEnum4 {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestEnum4*/(x = 1)
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
println(message = TestEnum4.TEST1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST2 = TEST2()
|
||||
private enum entry class TEST2 : TestEnum4 {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestEnum4*/(x = 2)
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val z: Int
|
||||
get
|
||||
|
||||
init {
|
||||
<this>.#z = <this>.<get-x>()
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
println(message = TestEnum4.TEST2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
abstract fun foo()
|
||||
fun values(): Array<TestEnum4> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum4 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
open enum class TestEnum5 : Enum<TestEnum5> {
|
||||
private constructor(x: Int = 0) /* primary */ {
|
||||
super/*Enum*/<TestEnum5>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
TEST1 = TestEnum5()
|
||||
|
||||
TEST2 = TestEnum5()
|
||||
|
||||
TEST3 = TestEnum5(x = 0)
|
||||
|
||||
fun values(): Array<TestEnum5> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum5 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
fun f(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
open enum class TestEnum6 : Enum<TestEnum6> {
|
||||
private constructor(x: Int, y: Int) /* primary */ {
|
||||
super/*Enum*/<TestEnum6>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: Int
|
||||
field = y
|
||||
get
|
||||
|
||||
TEST = { // BLOCK
|
||||
val tmp0_y: Int = f()
|
||||
val tmp1_x: Int = f()
|
||||
TestEnum6(x = tmp1_x, y = tmp0_y)
|
||||
}
|
||||
|
||||
fun values(): Array<TestEnum6> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum6 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
@@ -0,0 +1,165 @@
|
||||
enum class TestFinalEnum1 : Enum<TestFinalEnum1> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestFinalEnum1>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
X1 = TestFinalEnum1()
|
||||
|
||||
fun values(): Array<TestFinalEnum1> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestFinalEnum1 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
open enum class TestFinalEnum2 : Enum<TestFinalEnum2> {
|
||||
private constructor(x: Int) /* primary */ {
|
||||
super/*Enum*/<TestFinalEnum2>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
X1 = TestFinalEnum2(x = 1)
|
||||
|
||||
fun values(): Array<TestFinalEnum2> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestFinalEnum2 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
enum class TestFinalEnum3 : Enum<TestFinalEnum3> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestFinalEnum3>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
X1 = TestFinalEnum3()
|
||||
|
||||
fun doStuff() {
|
||||
}
|
||||
|
||||
fun values(): Array<TestFinalEnum3> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestFinalEnum3 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
open enum class TestOpenEnum1 : Enum<TestOpenEnum1> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestOpenEnum1>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
X1 = X1()
|
||||
private enum entry class X1 : TestOpenEnum1 {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestOpenEnum1*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "X1"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun values(): Array<TestOpenEnum1> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestOpenEnum1 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
open enum class TestOpenEnum2 : Enum<TestOpenEnum2> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestOpenEnum2>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
X1 = X1()
|
||||
private enum entry class X1 : TestOpenEnum2 {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestOpenEnum2*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
open fun foo() {
|
||||
}
|
||||
|
||||
fun values(): Array<TestOpenEnum2> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestOpenEnum2 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
abstract enum class TestAbstractEnum1 : Enum<TestAbstractEnum1> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestAbstractEnum1>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
X1 = X1()
|
||||
private enum entry class X1 : TestAbstractEnum1 {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestAbstractEnum1*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
abstract fun foo()
|
||||
fun values(): Array<TestAbstractEnum1> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestAbstractEnum1 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
interface IFoo {
|
||||
abstract fun foo()
|
||||
|
||||
}
|
||||
|
||||
open enum class TestAbstractEnum2 : IFoo, Enum<TestAbstractEnum2> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestAbstractEnum2>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
X1 = X1()
|
||||
private enum entry class X1 : TestAbstractEnum2 {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestAbstractEnum2*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun values(): Array<TestAbstractEnum2> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestAbstractEnum2 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
open enum class A : Enum<A> {
|
||||
X = A(arg = "asd")
|
||||
|
||||
Y = Y()
|
||||
private enum entry class Y : A {
|
||||
private constructor() /* primary */ {
|
||||
super/*A*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun f(): String {
|
||||
return super.f().plus(other = "#Y")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Z = A(x = 5)
|
||||
|
||||
val prop1: String
|
||||
get
|
||||
|
||||
val prop2: String
|
||||
field = "const2"
|
||||
get
|
||||
|
||||
var prop3: String
|
||||
field = ""
|
||||
get
|
||||
set
|
||||
|
||||
private constructor(arg: String) {
|
||||
super/*Enum*/<A>()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#prop1 = arg
|
||||
}
|
||||
|
||||
private constructor() {
|
||||
super/*Enum*/<A>()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#prop1 = "default"
|
||||
<this>.<set-prop3>(<set-?> = "empty")
|
||||
}
|
||||
|
||||
private constructor(x: Int) {
|
||||
this/*A*/(arg = x.toString())
|
||||
<this>.<set-prop3>(<set-?> = "int")
|
||||
}
|
||||
|
||||
open fun f(): String {
|
||||
return <this>.<get-prop1>().toString() + "#" + <this>.<get-prop2>().toString() + "#" + <this>.<get-prop3>().toString()
|
||||
}
|
||||
|
||||
fun values(): Array<A> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): A /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
open enum class Test0 : Enum<Test0> {
|
||||
private constructor(x: Int) /* primary */ {
|
||||
super/*Enum*/<Test0>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
ZERO = Test0()
|
||||
|
||||
private constructor() {
|
||||
this/*Test0*/(x = 0)
|
||||
}
|
||||
|
||||
fun values(): Array<Test0> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): Test0 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
open enum class Test1 : Enum<Test1> {
|
||||
private constructor(x: Int) /* primary */ {
|
||||
super/*Enum*/<Test1>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
ZERO = Test1()
|
||||
|
||||
ONE = Test1(x = 1)
|
||||
|
||||
private constructor() {
|
||||
this/*Test1*/(x = 0)
|
||||
}
|
||||
|
||||
fun values(): Array<Test1> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): Test1 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
abstract enum class Test2 : Enum<Test2> {
|
||||
private constructor(x: Int) /* primary */ {
|
||||
super/*Enum*/<Test2>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
ZERO = ZERO()
|
||||
private enum entry class ZERO : Test2 {
|
||||
private constructor() /* primary */ {
|
||||
super/*Test2*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
println(message = "ZERO")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ONE = ONE()
|
||||
private enum entry class ONE : Test2 {
|
||||
private constructor() /* primary */ {
|
||||
super/*Test2*/(x = 1)
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
println(message = "ONE")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private constructor() {
|
||||
this/*Test2*/(x = 0)
|
||||
}
|
||||
|
||||
abstract fun foo()
|
||||
fun values(): Array<Test2> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): Test2 /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class Test : Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
interface IFoo {
|
||||
abstract fun foo(): String
|
||||
|
||||
}
|
||||
|
||||
class K1 : JFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*JFoo*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class K2 : JFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*JFoo*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo(): @FlexibleNullability String {
|
||||
return super.foo()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class K3 : JUnrelatedFoo, IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*JUnrelatedFoo*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class K4 : JUnrelatedFoo, IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*JUnrelatedFoo*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo(): String? {
|
||||
return super.foo()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TestJFoo : IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = JFoo()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IFoo
|
||||
|
||||
}
|
||||
|
||||
class TestK1 : IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = K1()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IFoo
|
||||
|
||||
}
|
||||
|
||||
class TestK2 : IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = K2()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IFoo
|
||||
|
||||
}
|
||||
|
||||
class TestK3 : IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = K3()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IFoo
|
||||
|
||||
}
|
||||
|
||||
class TestK4 : IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = K4()
|
||||
}
|
||||
|
||||
override fun foo(): String {
|
||||
return <this>.#<$$delegate_0>.foo()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IFoo
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
class TestInitValInLambdaCalledOnce {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
get
|
||||
|
||||
init {
|
||||
1.run<Int, Unit>(block = local fun Int.<anonymous>() {
|
||||
<this>.#x = 0
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
inline class Test {
|
||||
constructor(x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
other !is Test -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test = other as Test
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#x.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
class C<T : Any?> {
|
||||
constructor(t: T) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val t: T
|
||||
field = t
|
||||
get
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.<get-t>() as Int
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inline class IC<TT : Any?> {
|
||||
constructor(c: C<TT>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val c: C<TT>
|
||||
field = c
|
||||
get
|
||||
|
||||
fun foo(): Int {
|
||||
return <this>.<get-c>().hashCode()
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
other !is IC<TT> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: IC<TT> = other as IC<TT>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#c, arg1 = tmp0_other_with_cast.#c).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#c.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "IC(" + "c=" + <this>.#c + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val ic: IC<Int> = IC<Int>(c = C<Int>(t = 42))
|
||||
when {
|
||||
EQEQ(arg0 = ic.foo(), arg1 = 42).not() -> return "FAIL"
|
||||
}
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
class Outer {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
open inner class TestInnerClass {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inner class DerivedInnerClass : TestInnerClass {
|
||||
constructor() /* primary */ {
|
||||
<this>.super/*TestInnerClass*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
class Outer {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
constructor(x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
constructor() {
|
||||
<this>.this/*Inner*/(x = 0)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
data class TestData {
|
||||
constructor(nn: Nothing?) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val nn: Nothing?
|
||||
field = nn
|
||||
get
|
||||
|
||||
fun component1(): Nothing? {
|
||||
return <this>.#nn
|
||||
}
|
||||
|
||||
fun copy(nn: Nothing? = <this>.#nn): TestData {
|
||||
return TestData(nn = nn)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is TestData -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: TestData = other as TestData
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#nn, arg1 = tmp0_other_with_cast.#nn).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return when {
|
||||
EQEQ(arg0 = <this>.#nn, arg1 = null) -> 0
|
||||
else -> <this>.#nn.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "TestData(" + "nn=" + <this>.#nn + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inline class TestInline {
|
||||
constructor(nn: Nothing?) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val nn: Nothing?
|
||||
field = nn
|
||||
get
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
other !is TestInline -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: TestInline = other as TestInline
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#nn, arg1 = tmp0_other_with_cast.#nn).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return when {
|
||||
EQEQ(arg0 = <this>.#nn, arg1 = null) -> 0
|
||||
else -> <this>.#nn.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "TestInline(" + "nn=" + <this>.#nn + ")"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
class A {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
private val b: <no name provided>
|
||||
field = { // BLOCK
|
||||
local class <no name provided> : DoubleExpression {
|
||||
private constructor() /* primary */ {
|
||||
super/*DoubleExpression*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override operator fun get(): Double {
|
||||
return 0.0D
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}
|
||||
private get
|
||||
|
||||
}
|
||||
|
||||
class C : DoubleExpression {
|
||||
constructor() /* primary */ {
|
||||
super/*DoubleExpression*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override operator fun get(): Double {
|
||||
return 0.0D
|
||||
}
|
||||
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
data class A {
|
||||
constructor(runA: @ExtensionFunctionType @ExtensionFunctionType Function2<A, String, Unit> = local fun A.<anonymous>(it: String) {
|
||||
return Unit
|
||||
}
|
||||
) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val runA: @ExtensionFunctionType @ExtensionFunctionType Function2<A, String, Unit>
|
||||
field = runA
|
||||
get
|
||||
|
||||
fun component1(): @ExtensionFunctionType @ExtensionFunctionType Function2<A, String, Unit> {
|
||||
return <this>.#runA
|
||||
}
|
||||
|
||||
fun copy(runA: @ExtensionFunctionType @ExtensionFunctionType Function2<A, String, Unit> = <this>.#runA): A {
|
||||
return A(runA = runA)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is A -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: A = other as A
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#runA, arg1 = tmp0_other_with_cast.#runA).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#runA.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "A(" + "runA=" + <this>.#runA + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
data class B {
|
||||
constructor(x: Any = { // BLOCK
|
||||
local class <no name provided> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Any
|
||||
field = x
|
||||
get
|
||||
|
||||
fun component1(): Any {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
fun copy(x: Any = <this>.#x): B {
|
||||
return B(x = x)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is B -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: B = other as B
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#x.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "B(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
interface IFoo {
|
||||
abstract fun foo()
|
||||
|
||||
}
|
||||
|
||||
val test1: <no name provided>
|
||||
field = { // BLOCK
|
||||
local class <no name provided> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}
|
||||
get
|
||||
|
||||
val test2: IFoo
|
||||
field = { // BLOCK
|
||||
local class <no name provided> : IFoo {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
println(message = "foo")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}
|
||||
get
|
||||
|
||||
class Outer {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
abstract inner class Inner : IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun test3(): Inner {
|
||||
return { // BLOCK
|
||||
local class <no name provided> : Inner {
|
||||
private constructor() /* primary */ {
|
||||
<this>.super/*Inner*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
println(message = "foo")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun Outer.test4(): Inner {
|
||||
return { // BLOCK
|
||||
local class <no name provided> : Inner {
|
||||
private constructor() /* primary */ {
|
||||
<this>.super/*Inner*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
println(message = "foo")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
abstract class Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
object Test : Base {
|
||||
private constructor() /* primary */ {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = 1
|
||||
get
|
||||
|
||||
val y: Int
|
||||
get
|
||||
|
||||
init {
|
||||
<this>.#y = <this>.<get-x>()
|
||||
}
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
open class Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TestImplicitPrimaryConstructor : Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TestExplicitPrimaryConstructor : Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TestWithDelegatingConstructor : Base {
|
||||
constructor(x: Int, y: Int) /* primary */ {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: Int
|
||||
field = y
|
||||
get
|
||||
|
||||
constructor(x: Int) {
|
||||
this/*TestWithDelegatingConstructor*/(x = x, y = 0)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
interface ILeft {
|
||||
fun foo() {
|
||||
}
|
||||
|
||||
val bar: Int
|
||||
get(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface IRight {
|
||||
fun foo() {
|
||||
}
|
||||
|
||||
val bar: Int
|
||||
get(): Int {
|
||||
return 2
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class CBoth : ILeft, IRight {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
super.foo()
|
||||
super.foo()
|
||||
}
|
||||
|
||||
override val bar: Int
|
||||
override get(): Int {
|
||||
return super.<get-bar>().plus(other = super.<get-bar>())
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
sealed class Expr {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
class Const : Expr {
|
||||
constructor(number: Double) /* primary */ {
|
||||
super/*Expr*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val number: Double
|
||||
field = number
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class Sum : Expr {
|
||||
constructor(e1: Expr, e2: Expr) /* primary */ {
|
||||
super/*Expr*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val e1: Expr
|
||||
field = e1
|
||||
get
|
||||
|
||||
val e2: Expr
|
||||
field = e2
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
object NotANumber : Expr {
|
||||
private constructor() /* primary */ {
|
||||
super/*Expr*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+47
@@ -0,0 +1,47 @@
|
||||
open class Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TestProperty : Base {
|
||||
val x: Int
|
||||
field = 0
|
||||
get
|
||||
|
||||
constructor() {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TestInitBlock : Base {
|
||||
val x: Int
|
||||
get
|
||||
|
||||
init {
|
||||
<this>.#x = 0
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
constructor(z: Any) {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
constructor(y: Int) {
|
||||
this/*TestInitBlock*/()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
open class Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
open fun foo() {
|
||||
}
|
||||
|
||||
open val bar: String
|
||||
field = ""
|
||||
open get
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return super.hashCode()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Derived : Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
super.foo()
|
||||
}
|
||||
|
||||
override val bar: String
|
||||
override get(): String {
|
||||
return super.<get-bar>()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
open class Base {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
open fun foo() {
|
||||
}
|
||||
|
||||
open val bar: String
|
||||
field = ""
|
||||
open get
|
||||
|
||||
}
|
||||
|
||||
interface BaseI {
|
||||
abstract fun foo()
|
||||
abstract val bar: String
|
||||
abstract get
|
||||
|
||||
}
|
||||
|
||||
class Derived : Base, BaseI {
|
||||
constructor() /* primary */ {
|
||||
super/*Base*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
super.foo()
|
||||
}
|
||||
|
||||
override val bar: String
|
||||
override get(): String {
|
||||
return super.<get-bar>()
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
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(a = A1(x = 42))
|
||||
@AA(xs = [A1(x = 1), A1(x = 2)])
|
||||
fun test() {
|
||||
}
|
||||
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
annotation class Ann : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
interface IFoo {
|
||||
@Ann
|
||||
abstract val testVal: String
|
||||
abstract get
|
||||
|
||||
@Ann
|
||||
abstract fun testFun()
|
||||
@Ann
|
||||
abstract val String.testExtVal: String
|
||||
abstract get
|
||||
|
||||
@Ann
|
||||
abstract fun String.testExtFun()
|
||||
|
||||
}
|
||||
|
||||
class DFoo : IFoo {
|
||||
constructor(d: IFoo) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = d
|
||||
}
|
||||
|
||||
override fun testFun() {
|
||||
<this>.#<$$delegate_0>.testFun()
|
||||
}
|
||||
|
||||
override fun String.testExtFun() {
|
||||
(<this>.#<$$delegate_0>, <this>).testExtFun()
|
||||
}
|
||||
|
||||
override val testVal: String
|
||||
override get(): String {
|
||||
return <this>.#<$$delegate_0>.<get-testVal>()
|
||||
}
|
||||
|
||||
override val String.testExtVal: String
|
||||
override get(): String {
|
||||
return (<this>.#<$$delegate_0>, <this>).<get-testExtVal>()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IFoo
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String = "", y: Int = 42) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: Int
|
||||
field = y
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
@A(x = "abc", y = 123)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@A(x = "def")
|
||||
fun test2() {
|
||||
}
|
||||
|
||||
@A(x = "ghi")
|
||||
fun test3() {
|
||||
}
|
||||
|
||||
@A(, y = 456)
|
||||
fun test4() {
|
||||
}
|
||||
|
||||
@A
|
||||
fun test5() {
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(vararg xs: String) /* primary */
|
||||
val xs: Array<out String>
|
||||
field = xs
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
@A(xs = ["abc", "def"])
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@A(xs = ["abc"])
|
||||
fun test2() {
|
||||
}
|
||||
|
||||
@A(xs = [])
|
||||
fun test3() {
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
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(x = [1, 2, 3])
|
||||
@TestAnnWithStringArray(x = ["a", "b", "c"])
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@TestAnnWithIntArray(x = [4, 5, 6])
|
||||
@TestAnnWithStringArray(x = ["d", "e", "f"])
|
||||
fun test2() {
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(klass: KClass<*>) /* primary */
|
||||
val klass: KClass<*>
|
||||
field = klass
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class C {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@A(klass = C::class)
|
||||
fun test1() {
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "class")
|
||||
class TestClass {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "interface")
|
||||
interface TestInterface {
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "object")
|
||||
object TestObject {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Host {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "companion")
|
||||
companion object TestCompanion {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "enum")
|
||||
enum class TestEnum : Enum<TestEnum> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestEnum>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
fun values(): Array<TestEnum> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "annotation")
|
||||
annotation class TestAnnotation : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
const val ONE: Int
|
||||
field = 1
|
||||
get
|
||||
|
||||
annotation class A : Annotation {
|
||||
constructor(x: Int) /* primary */
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
@A(x = 1)
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@A(x = 2)
|
||||
fun test2() {
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: Int) /* primary */
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class TestClass {
|
||||
@TestAnn(x = 1)
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = 2)
|
||||
constructor(x: Int) {
|
||||
this/*TestClass*/()
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
annotation class Ann : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
val test1: Int /* by */
|
||||
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
get(): Int {
|
||||
return #test1$delegate.getValue<Int>(thisRef = null, property = ::test1)
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class Cell {
|
||||
constructor(value: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
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 = Cell(value = 1)
|
||||
@A(x = "test1.get")
|
||||
get(): Int {
|
||||
return #test1$delegate.getValue(thisRef = null, kProp = ::test1)
|
||||
}
|
||||
|
||||
var test2: Int /* by */
|
||||
field = Cell(value = 2)
|
||||
@A(x = "test2.get")
|
||||
get(): Int {
|
||||
return #test2$delegate.getValue(thisRef = null, kProp = ::test2)
|
||||
}
|
||||
@A(x = "test2.set")
|
||||
set(@A(x = "test2.set.param") <set-?>: Int) {
|
||||
#test2$delegate.setValue(thisRef = null, kProp = ::test2, newValue = <set-?>)
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
open enum class TestEnum : Enum<TestEnum> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<TestEnum>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "ENTRY1")
|
||||
ENTRY1 = TestEnum()
|
||||
|
||||
@TestAnn(x = "ENTRY2")
|
||||
ENTRY2 = ENTRY2()
|
||||
@TestAnn(x = "ENTRY2")
|
||||
private enum entry class ENTRY2 : TestEnum {
|
||||
private constructor() /* primary */ {
|
||||
super/*TestEnum*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = 42
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
fun values(): Array<TestEnum> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): TestEnum /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
enum class En : Enum<En> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<En>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
A = En()
|
||||
|
||||
B = En()
|
||||
|
||||
C = En()
|
||||
|
||||
D = En()
|
||||
|
||||
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(x = En.A)
|
||||
fun test1() {
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
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
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
@file:A(x = "File annotation")
|
||||
package test
|
||||
|
||||
@Target(allowedTargets = [AnnotationTarget.FILE])
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: Int) /* primary */
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = 42)
|
||||
fun testSimpleFunction() {
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
interface IFoo {
|
||||
@Deprecated(message = "")
|
||||
val prop: String
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
@Deprecated(message = "")
|
||||
val String.extProp: String
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Delegated : IFoo {
|
||||
constructor(foo: IFoo) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = foo
|
||||
}
|
||||
|
||||
override val prop: String
|
||||
override get(): String {
|
||||
return <this>.#<$$delegate_0>.<get-prop>()
|
||||
}
|
||||
|
||||
override val String.extProp: String
|
||||
override get(): String {
|
||||
return (<this>.#<$$delegate_0>, <this>).<get-extProp>()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IFoo
|
||||
|
||||
}
|
||||
|
||||
class DefaultImpl : IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class ExplicitOverride : IFoo {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override val prop: String
|
||||
override get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
override val String.extProp: String
|
||||
override get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
fun foo(m: Map<String, Int>) {
|
||||
val test: Int
|
||||
val test$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
local get(): Int {
|
||||
return test$delegate.getValue<Int>(thisRef = null, property = ::test)
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
annotation class A1 : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
annotation class A2 : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
annotation class A3 : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
@A1
|
||||
@A2
|
||||
@A3
|
||||
fun test() {
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
annotation class Ann : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
class Test {
|
||||
constructor(@Ann x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
@TestAnn(x = "testVal.property")
|
||||
val testVal: String
|
||||
field = ""
|
||||
get
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class C {
|
||||
constructor(x: Int, y: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
@A(x = "C.x.get")
|
||||
get
|
||||
|
||||
var y: Int
|
||||
field = y
|
||||
@A(x = "C.y.get")
|
||||
get
|
||||
@A(x = "C.y.set")
|
||||
set
|
||||
|
||||
}
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
val test1: String
|
||||
@TestAnn(x = "test1.get")
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
var test2: String
|
||||
@TestAnn(x = "test2.get")
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
@TestAnn(x = "test2.set")
|
||||
set(value: String) {
|
||||
}
|
||||
|
||||
val test3: String
|
||||
field = ""
|
||||
@TestAnn(x = "test3.get")
|
||||
get
|
||||
|
||||
var test4: String
|
||||
field = ""
|
||||
@TestAnn(x = "test4.get")
|
||||
get
|
||||
@TestAnn(x = "test4.set")
|
||||
set
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
annotation class AnnParam : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
var p: Int
|
||||
field = 0
|
||||
get
|
||||
set
|
||||
|
||||
class C {
|
||||
constructor(p: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
var p: Int
|
||||
field = p
|
||||
get
|
||||
set
|
||||
|
||||
}
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
annotation class Ann : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
class A {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
fun @Ann String.f(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
val @Ann String?.p: String
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun @Ann String?.topLevelF(): String {
|
||||
return ""
|
||||
}
|
||||
|
||||
val @Ann String.topLevelP: String
|
||||
get(): String {
|
||||
return ""
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
annotation class A : Annotation {
|
||||
constructor(vararg xs: String) /* primary */
|
||||
val xs: Array<out String>
|
||||
field = xs
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
@A(xs = ["a", "b"])
|
||||
fun test() {
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
@TestAnn(x = "TestTypeAlias")
|
||||
typealias TestTypeAlias = String
|
||||
@Target(allowedTargets = [AnnotationTarget.TYPEALIAS])
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
@Target(allowedTargets = [AnnotationTarget.TYPE_PARAMETER])
|
||||
annotation class Anno : Annotation {
|
||||
constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
fun <T : Any?> foo() {
|
||||
}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
fun testFun(@TestAnn(x = "testFun.x") x: Int) {
|
||||
}
|
||||
|
||||
class TestClassConstructor1 {
|
||||
constructor(@TestAnn(x = "TestClassConstructor1.x") x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val xx: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
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(xs = [1, 2, 3])
|
||||
@A2(xs = ["a", "b", "c"])
|
||||
@AA(xs = [A1(xs = [4]), A1(xs = [5]), A1(xs = [6])])
|
||||
fun test1() {
|
||||
}
|
||||
|
||||
@A1(xs = [])
|
||||
@A2(xs = [])
|
||||
@AA(xs = [])
|
||||
fun test2() {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
annotation class TestAnn : Annotation {
|
||||
constructor(x: String) /* primary */
|
||||
val x: String
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val testVal: String = "testVal"
|
||||
var testVar: String = "testVar"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
val test: Unit
|
||||
field = try { // BLOCK
|
||||
}
|
||||
catch (e: Throwable){ // BLOCK
|
||||
}
|
||||
|
||||
get
|
||||
@@ -0,0 +1,56 @@
|
||||
class C {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val test1: Int
|
||||
field = 0
|
||||
get
|
||||
|
||||
val test2: Int
|
||||
get(): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
var test3: Int
|
||||
field = 0
|
||||
get
|
||||
set
|
||||
|
||||
var test4: Int
|
||||
field = 1
|
||||
get
|
||||
set(value: Int) {
|
||||
<this>.#test4 = value
|
||||
}
|
||||
|
||||
var test5: Int
|
||||
field = 1
|
||||
get
|
||||
private set
|
||||
|
||||
val test6: Int
|
||||
field = 1
|
||||
get
|
||||
|
||||
val test7: Int /* by */
|
||||
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
get(): Int {
|
||||
return <this>.#test7$delegate.getValue<Int>(thisRef = <this>, property = C::test7)
|
||||
}
|
||||
|
||||
var test8: Int? /* by */
|
||||
field = hashMapOf<String, Int>()
|
||||
get(): Int? {
|
||||
return <this>.#test8$delegate.getValue<Int?, Int?>(thisRef = <this>, property = C::test8)
|
||||
}
|
||||
set(<set-?>: Int?) {
|
||||
<this>.#test8$delegate.setValue<Int?>(thisRef = <this>, property = C::test8, value = <set-?>)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
val test1: Int /* by */
|
||||
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
get(): Int {
|
||||
return #test1$delegate.getValue<Int>(thisRef = null, property = ::test1)
|
||||
}
|
||||
|
||||
class C {
|
||||
constructor(map: MutableMap<String, Any>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val map: MutableMap<String, Any>
|
||||
field = map
|
||||
get
|
||||
|
||||
val test2: Int /* by */
|
||||
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
get(): Int {
|
||||
return <this>.#test2$delegate.getValue<Int>(thisRef = <this>, property = C::test2)
|
||||
}
|
||||
|
||||
var test3: Any /* by */
|
||||
field = <this>.<get-map>()
|
||||
get(): Any {
|
||||
return <this>.#test3$delegate.getValue<Any, Any>(thisRef = <this>, property = C::test3)
|
||||
}
|
||||
set(<set-?>: Any) {
|
||||
<this>.#test3$delegate.setValue<Any>(thisRef = <this>, property = C::test3, value = <set-?>)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var test4: Any? /* by */
|
||||
field = hashMapOf<String, Any>()
|
||||
get(): Any? {
|
||||
return #test4$delegate.getValue<Any?, Any?>(thisRef = null, property = ::test4)
|
||||
}
|
||||
set(<set-?>: Any?) {
|
||||
#test4$delegate.setValue<Any?>(thisRef = null, property = ::test4, value = <set-?>)
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
interface IFooStr {
|
||||
abstract fun foo(x: String)
|
||||
|
||||
}
|
||||
|
||||
interface IBar {
|
||||
abstract val bar: Int
|
||||
abstract get
|
||||
|
||||
}
|
||||
|
||||
abstract class CFoo<T : Any?> {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
fun foo(x: T) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Test1 : CFoo<String>, IFooStr, IBar {
|
||||
constructor() /* primary */ {
|
||||
super/*CFoo*/<String>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override val bar: Int
|
||||
field = 42
|
||||
override get
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
class C<T : Any?> {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
object Delegate {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
operator fun getValue(thisRef: Any?, kProp: Any?): Int {
|
||||
return 42
|
||||
}
|
||||
|
||||
operator fun setValue(thisRef: Any?, kProp: Any?, newValue: Int) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var <T : Any?> C<T>.genericDelegatedProperty: Int /* by */
|
||||
field = Delegate
|
||||
get(): Int {
|
||||
return #genericDelegatedProperty$delegate.getValue(thisRef = <this>, kProp = ::genericDelegatedProperty/*</* null */>()*/)
|
||||
}
|
||||
set(<set-?>: Int) {
|
||||
#genericDelegatedProperty$delegate.setValue(thisRef = <this>, kProp = ::genericDelegatedProperty/*</* null */>()*/, newValue = <set-?>)
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
inline class IT {
|
||||
constructor(x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
other !is IT -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: IT = other as IT
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#x.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "IT(" + "x=" + <this>.#x + ")"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inline class InlineMutableSet : MutableSet<IT> {
|
||||
constructor(ms: MutableSet<IT>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
private val ms: MutableSet<IT>
|
||||
field = ms
|
||||
private get
|
||||
|
||||
override val size: Int
|
||||
override get(): Int {
|
||||
return <this>.<get-ms>().<get-size>()
|
||||
}
|
||||
|
||||
override operator fun contains(element: IT): Boolean {
|
||||
return <this>.<get-ms>().contains(element = element)
|
||||
}
|
||||
|
||||
override fun containsAll(elements: Collection<IT>): Boolean {
|
||||
return <this>.<get-ms>().containsAll(elements = elements)
|
||||
}
|
||||
|
||||
override fun isEmpty(): Boolean {
|
||||
return <this>.<get-ms>().isEmpty()
|
||||
}
|
||||
|
||||
override fun add(element: IT): Boolean {
|
||||
return <this>.<get-ms>().add(element = element)
|
||||
}
|
||||
|
||||
override fun addAll(elements: Collection<IT>): Boolean {
|
||||
return <this>.<get-ms>().addAll(elements = elements)
|
||||
}
|
||||
|
||||
override fun clear() {
|
||||
<this>.<get-ms>().clear()
|
||||
}
|
||||
|
||||
override operator fun iterator(): MutableIterator<IT> {
|
||||
return <this>.<get-ms>().iterator()
|
||||
}
|
||||
|
||||
override fun remove(element: IT): Boolean {
|
||||
return <this>.<get-ms>().remove(element = element)
|
||||
}
|
||||
|
||||
override fun removeAll(elements: Collection<IT>): Boolean {
|
||||
return <this>.<get-ms>().removeAll(elements = elements)
|
||||
}
|
||||
|
||||
override fun retainAll(elements: Collection<IT>): Boolean {
|
||||
return <this>.<get-ms>().retainAll(elements = elements)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
other !is InlineMutableSet -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: InlineMutableSet = other as InlineMutableSet
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#ms, arg1 = tmp0_other_with_cast.#ms).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return <this>.#ms.hashCode()
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "InlineMutableSet(" + "ms=" + <this>.#ms + ")"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package interop
|
||||
|
||||
object Definitions {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
const val KT_CONSTANT: String?
|
||||
field = "constant"
|
||||
get
|
||||
|
||||
val ktValue: String?
|
||||
field = #CONSTANT
|
||||
get
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
interface I {
|
||||
val <T : Any?> T.id: T
|
||||
get(): T {
|
||||
return <this>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class A : I {
|
||||
constructor(i: I) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = i
|
||||
}
|
||||
|
||||
override val <T : Any?> T.id: T
|
||||
override get(): T {
|
||||
return (<this>.#<$$delegate_0>, <this>).<get-id></* null */>()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: I
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
fun outer() {
|
||||
local abstract class ALocal {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
abstract fun afun()
|
||||
abstract val aval: Int
|
||||
abstract get
|
||||
|
||||
abstract var avar: Int
|
||||
abstract get
|
||||
abstract set
|
||||
|
||||
}
|
||||
|
||||
local class Local : ALocal {
|
||||
constructor() /* primary */ {
|
||||
super/*ALocal*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun afun() {
|
||||
}
|
||||
|
||||
override val aval: Int
|
||||
field = 1
|
||||
override get
|
||||
|
||||
override var avar: Int
|
||||
field = 2
|
||||
override get
|
||||
override set
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
fun test1() {
|
||||
val x: Int
|
||||
val x$delegate: Lazy<Int> = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
local get(): Int {
|
||||
return x$delegate.getValue<Int>(thisRef = null, property = ::x)
|
||||
}
|
||||
|
||||
println(message = <get-x>())
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
var x: Int?
|
||||
val x$delegate: HashMap<String, Int> = hashMapOf<String, Int>()
|
||||
local get(): Int? {
|
||||
return x$delegate.getValue<Int?, Int?>(thisRef = null, property = ::x)
|
||||
}
|
||||
local set(<set-?>: Int?) {
|
||||
x$delegate.setValue<Int?>(thisRef = null, property = ::x, value = <set-?>)
|
||||
}
|
||||
|
||||
<set-x>(<set-?> = 0)
|
||||
val <unary>: Int = <get-x>() /*as Int */
|
||||
<set-x>(<set-?> = <unary>.inc())
|
||||
<unary> /*~> Unit */
|
||||
<set-x>(<set-?> = <get-x>() /*as Int */.plus(other = 1))
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun foo() {
|
||||
do// COMPOSITE {
|
||||
val x: Int = 42
|
||||
// } while (EQEQ(arg0 = x, arg1 = 42).not())
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
expect abstract class A {
|
||||
protected expect constructor() /* primary */
|
||||
expect abstract fun foo()
|
||||
|
||||
}
|
||||
|
||||
expect open class B : A {
|
||||
expect constructor(i: Int) /* primary */
|
||||
expect override fun foo()
|
||||
expect open fun bar(s: String)
|
||||
|
||||
}
|
||||
|
||||
abstract class A {
|
||||
protected constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
abstract fun foo()
|
||||
|
||||
}
|
||||
|
||||
open class B : A {
|
||||
constructor(i: Int) /* primary */ {
|
||||
super/*A*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
override fun foo() {
|
||||
}
|
||||
|
||||
open fun bar(s: String) {
|
||||
}
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
expect enum class MyEnum : Enum<MyEnum> {
|
||||
private expect constructor() /* primary */
|
||||
FOO = MyEnum()
|
||||
|
||||
BAR = MyEnum()
|
||||
|
||||
expect fun values(): Array<MyEnum>
|
||||
expect fun valueOf(value: String): MyEnum
|
||||
|
||||
}
|
||||
|
||||
enum class MyEnum : Enum<MyEnum> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Enum*/<MyEnum>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
FOO = MyEnum()
|
||||
|
||||
BAR = MyEnum()
|
||||
|
||||
BAZ = MyEnum()
|
||||
|
||||
fun values(): Array<MyEnum> /* Synthetic body for ENUM_VALUES */
|
||||
|
||||
fun valueOf(value: String): MyEnum /* Synthetic body for ENUM_VALUEOF */
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
expect sealed class Ops {
|
||||
private expect constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
expect class Add : Ops {
|
||||
expect constructor() /* primary */
|
||||
|
||||
}
|
||||
|
||||
sealed class Ops {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Add : Ops {
|
||||
constructor() /* primary */ {
|
||||
super/*Ops*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
val test1: Int
|
||||
field = 0
|
||||
get
|
||||
|
||||
val test2: Int
|
||||
get(): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
var test3: Int
|
||||
field = 0
|
||||
get
|
||||
set
|
||||
|
||||
var test4: Int
|
||||
field = 1
|
||||
get
|
||||
set(value: Int) {
|
||||
#test4 = value
|
||||
}
|
||||
|
||||
var test5: Int
|
||||
field = 1
|
||||
get
|
||||
private set
|
||||
|
||||
val test6: Int
|
||||
field = 1
|
||||
get
|
||||
|
||||
val test7: Int /* by */
|
||||
field = lazy<Int>(initializer = local fun <anonymous>(): Int {
|
||||
return 42
|
||||
}
|
||||
)
|
||||
get(): Int {
|
||||
return #test7$delegate.getValue<Int>(thisRef = null, property = ::test7)
|
||||
}
|
||||
|
||||
var test8: Int? /* by */
|
||||
field = hashMapOf<String, Int>()
|
||||
get(): Int? {
|
||||
return #test8$delegate.getValue<Int?, Int?>(thisRef = null, property = ::test8)
|
||||
}
|
||||
set(<set-?>: Int?) {
|
||||
#test8$delegate.setValue<Int?>(thisRef = null, property = ::test8, value = <set-?>)
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
class Test1<T1 : Any?, T2 : Any?> {
|
||||
constructor(x: T1, y: T2) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: T1
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: T2
|
||||
field = y
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class Test2 {
|
||||
constructor(x: Int, y: String) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val y: String
|
||||
field = y
|
||||
get
|
||||
|
||||
inner class TestInner<Z : Any?> {
|
||||
constructor(z: Z) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val z: Z
|
||||
field = z
|
||||
get
|
||||
|
||||
constructor(z: Z, i: Int) {
|
||||
<this>.this/*TestInner*/<Z>(z = z)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Test3 {
|
||||
constructor(x: Int, y: String = "") /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: String
|
||||
field = y
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
class Test4<T : Any?> {
|
||||
constructor(x: Int) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: Int
|
||||
field = x
|
||||
get
|
||||
|
||||
constructor(x: Int, y: Int = 42) {
|
||||
this/*Test4*/<T>(x = x.plus(other = y))
|
||||
}
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
data class Test<T : Any?> {
|
||||
constructor(x: T, y: String = "") /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: T
|
||||
field = x
|
||||
get
|
||||
|
||||
val y: String
|
||||
field = y
|
||||
get
|
||||
|
||||
fun component1(): T {
|
||||
return <this>.#x
|
||||
}
|
||||
|
||||
fun component2(): String {
|
||||
return <this>.#y
|
||||
}
|
||||
|
||||
fun copy(x: T = <this>.#x, y: String = <this>.#y): Test<T> {
|
||||
return Test<Any>(x = x, y = y)
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
when {
|
||||
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||
}
|
||||
when {
|
||||
other !is Test<T> -> return false
|
||||
}
|
||||
val tmp0_other_with_cast: Test<T> = other as Test<T>
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
|
||||
}
|
||||
when {
|
||||
EQEQ(arg0 = <this>.#y, arg1 = tmp0_other_with_cast.#y).not() -> return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
var result: Int = when {
|
||||
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
|
||||
else -> <this>.#x.hashCode()
|
||||
}
|
||||
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
|
||||
return result
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "Test(" + "x=" + <this>.#x + ", " + "y=" + <this>.#y + ")"
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
interface IBase<T : Any?> {
|
||||
abstract fun foo(x: Int)
|
||||
abstract val bar: Int
|
||||
abstract get
|
||||
|
||||
abstract fun <X : Any?> qux(t: T, x: X)
|
||||
|
||||
}
|
||||
|
||||
class Test<TT : Any?> : IBase<TT> {
|
||||
constructor(impl: IBase<TT>) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
<this>.#<$$delegate_0> = impl
|
||||
}
|
||||
|
||||
override fun foo(x: Int) {
|
||||
<this>.#<$$delegate_0>.foo(x = x)
|
||||
}
|
||||
|
||||
override fun <X : Any?> qux(t: TT, x: X) {
|
||||
<this>.#<$$delegate_0>.qux</* null */>(t = t, x = x)
|
||||
}
|
||||
|
||||
override val bar: Int
|
||||
override get(): Int {
|
||||
return <this>.#<$$delegate_0>.<get-bar>()
|
||||
}
|
||||
|
||||
local /*final field*/ val <$$delegate_0>: IBase<TT>
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
val test1: Function1<String, String>
|
||||
field = local fun <anonymous>(it: String): String {
|
||||
return it
|
||||
}
|
||||
|
||||
get
|
||||
|
||||
val test2: @ExtensionFunctionType @ExtensionFunctionType Function2<Any, Any, Any>
|
||||
field = local fun Any.<anonymous>(it: Any): Int {
|
||||
return it.hashCode()
|
||||
}
|
||||
|
||||
get
|
||||
|
||||
val test3: Function2<Int, Int, Unit>
|
||||
field = local fun <anonymous>(i: Int, j: Int) {
|
||||
return Unit
|
||||
}
|
||||
|
||||
get
|
||||
|
||||
val test4: Function2<Int, Int, Unit>
|
||||
field = local fun <no name provided>(i: Int, j: Int) {
|
||||
}
|
||||
|
||||
get
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
class Test1<T : U, U : Any?> {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun <T : U, U : Any?> test2() {
|
||||
}
|
||||
|
||||
var <T : U, U : Any?> Test1<T, U>.test3: Unit
|
||||
get() {
|
||||
}
|
||||
set(value: Unit) {
|
||||
}
|
||||
Vendored
+38
@@ -0,0 +1,38 @@
|
||||
abstract class Base1<T : Derived1> {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Derived1 : Base1<Derived1> {
|
||||
constructor() /* primary */ {
|
||||
super/*Base1*/<Derived1>()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
abstract class Base2 {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
fun <T : Derived2> foo(x: T) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Derived2 : Base2 {
|
||||
constructor() /* primary */ {
|
||||
super/*Base2*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
fun f(f1: Function0<String> = local fun <anonymous>(): ErrorType /* ERROR */ {
|
||||
return error("") /* ERROR CALL */
|
||||
}
|
||||
, f2: Function0<String> = local fun <anonymous>(): String {
|
||||
return "FAIL"
|
||||
}
|
||||
): String {
|
||||
return f1.invoke()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
var result: String = "fail"
|
||||
try f()
|
||||
catch (e: Exception){ // BLOCK
|
||||
result = "OK"
|
||||
}
|
||||
/*~> Unit */
|
||||
return f(, f2 = local fun <anonymous>(): String {
|
||||
return "O"
|
||||
}
|
||||
).plus(other = f(f1 = local fun <anonymous>(): String {
|
||||
return "K"
|
||||
}
|
||||
))
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
object Host {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
class StringDelegate {
|
||||
constructor(s: String) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val s: String
|
||||
field = s
|
||||
get
|
||||
|
||||
operator fun getValue(receiver: String, p: Any): String {
|
||||
return receiver.plus(other = <this>.<get-s>())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
operator fun String.provideDelegate(host: Any?, p: Any): StringDelegate {
|
||||
return StringDelegate(s = <this>)
|
||||
}
|
||||
|
||||
val String.plusK: String /* by */
|
||||
field = (<this>, "K").provideDelegate(host = <this>, p = Host::plusK)
|
||||
get(): String {
|
||||
return <this>.#plusK$delegate.getValue(receiver = <this>, p = Host::plusK)
|
||||
}
|
||||
|
||||
val ok: String
|
||||
field = (<this>, "O").<get-plusK>()
|
||||
get
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
typealias Test1 = String
|
||||
fun foo() {
|
||||
{ // BLOCK
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
val test1: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */
|
||||
get
|
||||
|
||||
val test2: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */
|
||||
get
|
||||
|
||||
val test3: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */56;
|
||||
get
|
||||
|
||||
val test4: ErrorType /* ERROR */
|
||||
field = error("") /* ERROR CALL */error("") /* ERROR EXPRESSION */;
|
||||
get
|
||||
@@ -0,0 +1,11 @@
|
||||
fun <R : Number> Number.convert(): R {
|
||||
return TODO()
|
||||
}
|
||||
|
||||
fun foo(arg: Number) {
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val x: Int = 0
|
||||
foo(arg = x.convert<Number>())
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
val p: Int
|
||||
field = 0
|
||||
get
|
||||
|
||||
fun foo(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
fun test(a: IntArray): Int {
|
||||
return a.get(index = 0).plus(other = a.get(index = <get-p>())).plus(other = a.get(index = foo()))
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fun test() {
|
||||
val x: IntArray = intArrayOf(elements = [1, 2, 3])
|
||||
x.set(index = 1, value = 0)
|
||||
}
|
||||
|
||||
fun foo(): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
intArrayOf(elements = [1, 2, 3]).set(index = foo(), value = 1)
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
fun foo(): IntArray {
|
||||
return intArrayOf(elements = [1, 2, 3])
|
||||
}
|
||||
|
||||
fun bar(): Int {
|
||||
return 42
|
||||
}
|
||||
|
||||
class C {
|
||||
constructor(x: IntArray) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val x: IntArray
|
||||
field = x
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
fun testVariable() {
|
||||
var x: IntArray = foo()
|
||||
{ // BLOCK
|
||||
val <<array>>: IntArray = x
|
||||
val <<index_0>>: Int = 0
|
||||
<<array>>.set(index = <<index_0>>, value = <<array>>.get(index = <<index_0>>).plus(other = 1))
|
||||
}
|
||||
}
|
||||
|
||||
fun testCall() {
|
||||
{ // BLOCK
|
||||
val <<array>>: IntArray = foo()
|
||||
val <<index_0>>: Int = bar()
|
||||
<<array>>.set(index = <<index_0>>, value = <<array>>.get(index = <<index_0>>).times(other = 2))
|
||||
}
|
||||
}
|
||||
|
||||
fun testMember(c: C) {
|
||||
val <array>: IntArray = c.<get-x>()
|
||||
val <index0>: Int = 0
|
||||
val <unary>: Int = <array>.get(index = <index0>)
|
||||
<array>.set(index = <index0>, value = <unary>.inc())
|
||||
<unary> /*~> Unit */
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
interface IA {
|
||||
abstract operator fun get(index: String): Int
|
||||
|
||||
}
|
||||
|
||||
interface IB {
|
||||
abstract operator fun IA.set(index: String, value: Int)
|
||||
|
||||
}
|
||||
|
||||
fun IB.test(a: IA) {
|
||||
{ // BLOCK
|
||||
val <<array>>: IA = a
|
||||
val <<index_0>>: String = ""
|
||||
(<this>, <<array>>).set(index = <<index_0>>, value = <<array>>.get(index = <<index_0>>).plus(other = 42))
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
var p: Int
|
||||
field = 0
|
||||
get
|
||||
set
|
||||
|
||||
fun testVariable() {
|
||||
var x: Int = 0
|
||||
x = x.plus(other = 1)
|
||||
x = x.minus(other = 2)
|
||||
x = x.times(other = 3)
|
||||
x = x.div(other = 4)
|
||||
x = x.rem(other = 5)
|
||||
}
|
||||
|
||||
fun testProperty() {
|
||||
<set-p>(<set-?> = <get-p>().plus(other = 1))
|
||||
<set-p>(<set-?> = <get-p>().minus(other = 2))
|
||||
<set-p>(<set-?> = <get-p>().times(other = 3))
|
||||
<set-p>(<set-?> = <get-p>().div(other = 4))
|
||||
<set-p>(<set-?> = <get-p>().rem(other = 5))
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
class A {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
operator fun A.plusAssign(s: String) {
|
||||
}
|
||||
|
||||
operator fun A.minusAssign(s: String) {
|
||||
}
|
||||
|
||||
operator fun A.timesAssign(s: String) {
|
||||
}
|
||||
|
||||
operator fun A.divAssign(s: String) {
|
||||
}
|
||||
|
||||
operator fun A.remAssign(s: String) {
|
||||
}
|
||||
|
||||
val p: A
|
||||
field = A()
|
||||
get
|
||||
|
||||
fun testVariable() {
|
||||
val a: A = A()
|
||||
a.plusAssign(s = "+=")
|
||||
a.minusAssign(s = "-=")
|
||||
a.timesAssign(s = "*=")
|
||||
a.divAssign(s = "/=")
|
||||
a.remAssign(s = "*=")
|
||||
}
|
||||
|
||||
fun testProperty() {
|
||||
<get-p>().plusAssign(s = "+=")
|
||||
<get-p>().minusAssign(s = "-=")
|
||||
<get-p>().timesAssign(s = "*=")
|
||||
<get-p>().divAssign(s = "/=")
|
||||
<get-p>().remAssign(s = "%=")
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
class Host {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
operator fun plusAssign(x: Int) {
|
||||
}
|
||||
|
||||
fun test1() {
|
||||
<this>.plusAssign(x = 1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun foo(): Host {
|
||||
return Host()
|
||||
}
|
||||
|
||||
fun Host.test2() {
|
||||
<this>.plusAssign(x = 1)
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
foo().plusAssign(x = 1)
|
||||
}
|
||||
|
||||
fun test4(a: Function0<Host>) {
|
||||
a.invoke().plusAssign(x = 1)
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
fun test1() {
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ERROR EXPRESSION */
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
L1@ while (true) { // BLOCK
|
||||
error("") /* ERROR EXPRESSION */
|
||||
error("") /* ERROR EXPRESSION */
|
||||
}
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
L1@ while (true) { // BLOCK
|
||||
val lambda: Function0<Nothing> = local fun <anonymous>(): Nothing {
|
||||
break@L1
|
||||
continue@L1
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
while (error("") /* ERROR EXPRESSION */) { // BLOCK
|
||||
}
|
||||
while (error("") /* ERROR EXPRESSION */) { // BLOCK
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user