FIR: reproduce KT-42656
This commit is contained in:
committed by
Mikhail Glukhikh
parent
96834d6f4c
commit
65545a10c4
@@ -0,0 +1,27 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTIME
|
||||
|
||||
// FILE: JClass.java
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
|
||||
public class JClass {
|
||||
public final Set<String> field;
|
||||
|
||||
public JClass(String... ins) {
|
||||
field = new HashSet<String>(Arrays.asList(ins));
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun collect(lst: List<JClass>): String {
|
||||
return lst.flatMap(JClass::field).joinToString(separator = "")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return collect(listOf(JClass("O"), JClass("K")))
|
||||
}
|
||||
Reference in New Issue
Block a user