10 lines
162 B
Kotlin
Vendored
10 lines
162 B
Kotlin
Vendored
fun Any.withInvoke(f: String.() -> Unit) {
|
|
if (this is String) {
|
|
f() // Should be OK
|
|
}
|
|
}
|
|
|
|
fun String.withInvoke(f: String.() -> Unit) {
|
|
f()
|
|
}
|