KT-128 Support passing only the last closure if all the other parameters have default values

This commit is contained in:
Andrey Breslav
2011-10-27 21:27:57 +04:00
parent c6c97c749d
commit cff5ea58de
@@ -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
// ...
}
}