Huib Donkers
08/26/2025, 11:13 AMcrossinline
, forbids the non-local return, but I can no longer initialize member `val`s from the lambda. I can initialize member `var`s, and local `val`s. See playground example here. I don't understand why initializing member val
would no longer be possible.
◦ When trying to initialize a member val
kotlin 1.9.25 errors "Captured values initialization is forbidden due to possible reassignment" (is the contract not understood here?) and kotlin 2 errors "Initialization of captured member values must be inlined" (is it not inlined?)