AN
Size: a a a
AN
AN
BP
open class Base<out T : Base> {- вроде так
агт doSomething(): T {
return this
}
}
BP
AA
BP
AA
VP
AA
BP
BP
val a = A().apply {
doSomething()
doAnother()
}
BP
AA
BP
interface Build<out T : Build<T>> {
fun foo(): T {
return this as T
}
}
class A : Build<A> {
fun bar(): A {
return this
}
}
fun main() {
val a = A().apply {
foo()
bar()
}
a.foo().bar()
}
AS
BP
BP
AA
AA