[IR] dumpKotlinLike: add testdata for FIR tests

This commit is contained in:
Zalim Bashorov
2020-11-20 18:18:14 +03:00
committed by teamcityserver
parent d7bd4240e1
commit c68040753d
298 changed files with 12186 additions and 0 deletions
@@ -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
}
@@ -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)
}
}
}
+39
View File
@@ -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 + ")"
}
}
@@ -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
}
@@ -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
}
@@ -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
}
@@ -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>() */
}
}
@@ -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
View File
@@ -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 */
}
@@ -0,0 +1,8 @@
class Test : Base {
constructor() /* primary */ {
super/*Base*/()
/* <init>() */
}
}
@@ -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>() */
}
}
}
@@ -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)
}
}
}
+80
View File
@@ -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 + ")"
}
}
+40
View File
@@ -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
}
}
@@ -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>()
}
}
@@ -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>() */
}
}
}
@@ -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>()
}
}