Skip to content

Instantly share code, notes, and snippets.

@bastionkid
Created August 15, 2022 16:20
Show Gist options
  • Save bastionkid/1f1d142dee63dab5dce691d4741da53b to your computer and use it in GitHub Desktop.
Save bastionkid/1f1d142dee63dab5dce691d4741da53b to your computer and use it in GitHub Desktop.
LiveLiteral generated code
fun earth() {
print(LiveLiterals$EarthKt.`getString$arg-0$call-print$fun-earth`())
}
object LiveLiterals$EarthKt {
var `String$arg-0$call-print$fun-earth`: String = "Bye World"
var `State$String$arg-0$call-print$fun-earth`: MutableState<String>? = null
fun `getString$arg-0$call-print$fun-earth`(): String {
val currentState = this.`State$String$arg-0$call-print$fun-earth`
val state = if (currentState == null) {
val tmp = liveLiteral(
"String$arg-0$call-print$fun-earth",
this.`String$arg-0$call-print$fun-earth`
)
this.`State$String$arg-0$call-print$fun-earth` = tmp // or currentState = tmp
tmp
} else currentState
return state.value
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment