Skip to content

Instantly share code, notes, and snippets.


PatilShreyas/DestructDecl.kt.diff Secret

Last active Dec 29, 2020
What would you like to do?
data class User(val id: Int, val name: String)
fun main() {
- val user = getUser()
- val userId =
- val userName =
+ val (userId, userName) = getUser()
fun getUser() = User(1, "John Doe")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment