Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2195.kt
T
2014-10-01 18:52:52 +04:00

8 lines
249 B
Kotlin

//KT-2195 error "Only safe calls are allowed ..." but it is function param (val)
package foo
private fun sendCommand<T>(errorCallback: (()->Unit)? = null) {
if (errorCallback != null) {
<!DEBUG_INFO_SMARTCAST!>errorCallback<!>()
}
}