KT-128 Support passing only the last closure if all the other parameters have default values
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// KT-128 Support passing only the last closure if all the other parameters have default values
|
||||
|
||||
fun div(c : String = "", f : fun()) {}
|
||||
fun f() {
|
||||
div { // Nothing passed, but could have been...
|
||||
// ...
|
||||
}
|
||||
|
||||
div (c = "foo") { // More things could have been passed
|
||||
// ...
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user