Extract Function: Limit the set of allowed containers for the default action

This commit is contained in:
Alexey Sedunov
2014-06-02 14:20:08 +04:00
parent 966def6c77
commit ee52073488
14 changed files with 183 additions and 5 deletions
@@ -0,0 +1,13 @@
class A {
fun foo(a: Int, b: Int): Int {
return object: Function0<Int> {
override fun invoke(): Int {
return i()
}
fun i(): Int {
return a + b - 1
}
}
}
}