janvladimirmostert
09/11/2017, 12:28 PMilya.gorbunov
09/11/2017, 5:19 PMjanvladimirmostert
09/11/2017, 5:37 PMnoinline
hacks.
Would that also allow me to this?
inline fun blah(
f1: (em: EM) -> Unit = { },
f2: (em: EM) -> Any? = { null }
): Result {
f1(em)
val res = f2(em)
return Result()
}
blah {
// no statement here
}
and
blah {
"a string statement" // statement which can be picked up by `val res = f2(em)`
}
ilya.gorbunov
09/11/2017, 6:02 PMf2
argument.janvladimirmostert
09/11/2017, 6:06 PMblah {
// no statement here
}
Expected a value of Any?
Even when I reduce it to:
val ffun: (em: EntityManager) -> Any? = { null }
inline fun blah(
noinline f: (em: EM) -> Any? = ffun
): Result {
val res = f(em)
return Result()
}
ilya.gorbunov
09/11/2017, 6:10 PMjanvladimirmostert
09/11/2017, 6:10 PM