Files
kotlin/compiler/testData/codegen/box/javaInterop/objectMethods/cloneHashSet.kt
2019-11-19 11:00:09 +03:00

14 lines
278 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
fun box(): String {
val a = HashSet<String>()
a.add("live")
a.add("long")
a.add("prosper")
val b = a.clone()
if (a != b) return "Fail equals"
if (a === b) return "Fail identity"
return "OK"
}