<Add the Instance of the class to constructor para...
# stackoverflow
u
Add the Instance of the class to constructor parameter property I have the following class structure. The CarModel Class has a defects List which is of Type CarDefects. And I wanted to add the instance of the CarDefects class into this list of defects of carModel which is passed as a parameter for the CarDefects constructor. However i cannot the use the add method and the error message says the following: Unresolved reference: add class CarModel(val brand: Brand, val modelName: String, val version: Int){ var defects: List? = null inner class...