М
Size: a a a
М
AO
AO
BV
BV
AO
val flag = true
fun <A> foo(f: () -> A): A? = if(flag) f() else null
fun <A> bar(f: () ->A): A = foo(f).let { res -> if(res == null) throw Exception("shit happens) else res }
val res = bar<Int?> { null } //oops expected null but exception was thrown
AO
AO
BV
val flag = true
fun <A> foo(f: () -> A): A? = if(flag) f() else null
fun <A> bar(f: () ->A): A = foo(f).let { res -> if(res == null) throw Exception("shit happens) else res }
val res = bar<Int?> { null } //oops expected null but exception was thrown
BV
AO
BV
AO
AO
BV
BV
AN
M
AO
BV