7747643945
These two functions apparently are represented in Kotlin as methods of `kotlin.String`. Because of that we accidentally treated them as builtins. To also minimize such cases, added filtration by return type. We are allowing to interpret only these functions that have primitive or unsigned return type. #KT-57028 Fixed
15 lines
449 B
Kotlin
Vendored
15 lines
449 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// WITH_STDLIB
|
|
// FULL_JDK
|
|
|
|
// java.lang.NoSuchMethodError: java.lang.String.chars
|
|
// IGNORE_BACKEND: ANDROID
|
|
import kotlin.streams.toList
|
|
|
|
fun box(): String {
|
|
val shoulNotBeEveluated1 = "HelloWorld".chars()
|
|
val shoulNotBeEveluated2 = "HelloWorld".codePoints()
|
|
val shoulNotBeEveluated3 = "HelloWorld".chars().toList().groupBy { it }.map { it.key to it.value.size }.joinToString().also(::println)
|
|
return "OK"
|
|
}
|