[FIR] Make expect class members also expect

This commit is contained in:
Mikhail Glukhikh
2020-06-24 15:25:52 +03:00
parent 2fefa682b7
commit c1609ed490
20 changed files with 124 additions and 85 deletions
@@ -1,10 +1,13 @@
FILE: common.kt
public open expect class A : R|kotlin/Any| {
public constructor(): R|A| {
public expect constructor(): R|A| {
super<R|kotlin/Any|>()
}
public final fun foo(): R|kotlin/Unit|
public final expect fun foo(): R|kotlin/Unit|
public final expect val x: R|kotlin/Int|
public get(): R|kotlin/Int|
}
public open class B : R|A| {
@@ -25,6 +28,9 @@ FILE: jvm.kt
public final fun bar(): R|kotlin/Unit| {
}
public final actual val x: R|kotlin/Int| = Int(42)
public get(): R|kotlin/Int|
}
public final class C : R|B| {
public constructor(): R|C| {
@@ -34,6 +40,7 @@ FILE: jvm.kt
public final fun test(): R|kotlin/Unit| {
this@R|/C|.R|/A.foo|()
this@R|/C|.R|/A.bar|()
this@R|/C|.R|/A.x|.R|kotlin/Int.plus|(this@R|/C|.R|/A.x|)
}
}
@@ -45,6 +52,7 @@ FILE: jvm.kt
public final fun test(): R|kotlin/Unit| {
this@R|/D|.R|/A.foo|()
this@R|/D|.R|/A.bar|()
this@R|/D|.R|/A.x|.R|kotlin/Int.plus|(this@R|/D|.R|/A.x|)
}
}