0

I have the following data class in Kotlin.

data class UserAccount(
    val accountName:  String,
    val accountLink:  String,
    val accountPhoto: String
)

I also have the following code that is giving me a headache.

var x: List<UserAccount> = emptyList()
var y: List<UserAccount> = emptyList()

x.addAll(y)

Could anyone shed some light on what exactly I am doing wrong?

enter image description here

AlanSTACK
  • 5,525
  • 3
  • 40
  • 99

0 Answers0