igorlukanin
03/25/2016, 3:48 AMIn Kotlin, there is a convention that if the last parameter to a function is a function, that parameter can be specified outside of the parenthesesCan’t we have the same behaviour for the last (and the only) parameter to a constructor? In some cases it may “unclutter” the code a little bit:
open class A(func: A.() -> Unit)
class B: A({
// Works
})
class C: A {
// Doesn't work
}