arkadiy
06/13/2017, 10:16 AMinterface Foo { int bar(); }
why do I need an explicit labeled return in Kotlin when using SAM conversion when creating a property - instance of this interface:
val foo = Foo { return@Foo 5}
why cannot I just write:
val foo = Foo { return 5 }
I know that I can just write it as val foo = Foo { 5 }
, but I wonder why I need the labeled return in the second exampleradityagumay
06/13/2017, 5:39 PMarkadiy
06/14/2017, 6:44 AM