Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlinsuspend compiled to state machineSingle-choice MCQ

In the generated state machine, what becomes of a local variable whose lifetime spans a suspension point (it is written before the suspend call and read after)?

suspend fun sum(): Int { val base = compute() // local val extra = fetch() // suspends return base + extra // base read after resume }