Files
kotlin-fork/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambda.kt
T
2018-05-24 15:15:21 +03:00

24 lines
413 B
Kotlin
Vendored

// "Replace with 'useSimple(simple(init))'" "true"
fun simple(param: Int = 0, init: () -> Unit): Int {
init()
return param
}
@Deprecated("Use useSimple instead", ReplaceWith("useSimple(simple(init))"))
fun use(init: () -> Unit): Int {
init()
return 0
}
fun useSimple(s: Int): Int {
return s
}
fun println(s: String) {}
fun useIt() {
val t = use<caret> {
println("abc")
}
}