Files
kotlin-fork/compiler/testData/codegen/box/sealed/kt54028_cursed.kt
T
Vladimir Sukharev 5c7d321e45 [Test] Convert IGNORE: NATIVE directives in box tests "sealed"
^KT-59057

Merge-request: KT-MR-10763
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-23 13:53:29 +00:00

38 lines
884 B
Kotlin
Vendored

// ALLOW_FILES_WITH_SAME_NAMES
// The test infrastructure for Kotlin/Native doesn't allow files with same names.
// TARGET_BACKEND: JVM
// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: JS_IR
// K2 JS_IR MUTE_REASON: java.lang.NullPointerException at org.jetbrains.kotlin.fir.backend.Fir2IrClassifierStorage.getIrClassSymbol
// IGNORE_BACKEND_K2: JS_IR
// Test that if we have two different files with the same name in the same package, KT-54028 doesn't reproduce.
// MODULE: lib
// FILE: cursed.kt
sealed interface LazyGridLayoutInfo {
fun ok(): String
}
// FILE: cursed.kt
class LazyGridState {
val layoutInfo: LazyGridLayoutInfo
get() = EmptyLazyGridLayoutInfo
}
private object EmptyLazyGridLayoutInfo : LazyGridLayoutInfo {
override fun ok() = "OK"
}
// MODULE: main(lib)
// FILE: main.kt
fun box(): String {
return LazyGridState().layoutInfo.ok()
}