KT-2195 error "Only safe calls are allowed ..." but it is function param (val)

#KT-2195
This commit is contained in:
Svetlana Isakova
2012-06-08 15:27:49 +04:00
parent 90a8aa334c
commit e05c310cdb
5 changed files with 30 additions and 9 deletions
@@ -0,0 +1,8 @@
//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) {
errorCallback()
}
}