Fir2IrLazyClass: don't generate non-f/o properties from superclass

This commit is contained in:
Mikhail Glukhikh
2020-12-03 10:43:50 +03:00
committed by TeamCityServer
parent 9b0ada2b0f
commit 94014ba3eb
7 changed files with 55 additions and 2 deletions
@@ -0,0 +1,24 @@
// TARGET_BACKEND: JVM
// FILE: A.kt
// WITH_RUNTIME
abstract class IncrementalCompilerRunner<T>(
private val workingDir: String,
val fail: Boolean,
val output: Collection<String> = emptyList()
) {
fun res(res: T? = null): String = (res as? String) ?: (if (fail) "FAIL" else workingDir)
}
class IncrementalJsCompilerRunner(
private val workingDir: String,
fail: Boolean = true
) : IncrementalCompilerRunner<String>(workingDir, fail) {
}
// FILE: B.kt
fun box(): String {
val runner = IncrementalJsCompilerRunner(workingDir = "OK", fail = false)
return runner.res()
}