LastExceed
01/27/2022, 2:52 PMval x: (suspend (Int) -> Int) = suspend { x: Int -> x * x }
even when specifying all the types explicitly i get this error:
Type mismatch.
Required: suspend (Int) → Int
Found: suspend () → Int
why?Michael de Kaste
01/27/2022, 2:59 PMpublic inline fun <R> suspend(noinline block: suspend () -> R): suspend () -> R = block
thus it cant accept any function with an inputLastExceed
01/27/2022, 3:06 PMsmit01
01/27/2022, 3:12 PMMichael de Kaste
01/27/2022, 3:14 PMval x = { x: Int -> x * x }
would be enoughLastExceed
01/27/2022, 3:14 PMsmit01
01/27/2022, 3:15 PMLastExceed
01/28/2022, 1:21 PM