e822e871f5
* Convert lambda to reference: support a function which has default parameters/unit return type/suspendability #KT-39532 Fixed
11 lines
213 B
Kotlin
Vendored
11 lines
213 B
Kotlin
Vendored
// IS_APPLICABLE: false
|
|
// COMPILER_ARGUMENTS: -XXLanguage:-FunctionReferenceWithDefaultValueAsOtherType
|
|
|
|
fun Int.exec(f: (Int) -> Unit) = f(this)
|
|
|
|
fun bar(x: Int) = x
|
|
|
|
fun foo() {
|
|
2.exec {<caret> bar(it) }
|
|
}
|