c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
27 lines
638 B
Kotlin
Vendored
27 lines
638 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// MODULE: lib
|
|
// WITH_STDLIB
|
|
// FILE: A.kt
|
|
|
|
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) {
|
|
}
|
|
|
|
// MODULE: main(lib)
|
|
// FILE: B.kt
|
|
|
|
fun box(): String {
|
|
val runner = IncrementalJsCompilerRunner(workingDir = "OK", fail = false)
|
|
return runner.res()
|
|
}
|