I have the following structure in a data class:
data class A(
val b: Int,
val c: C
) {
data class B(
val d: Int
)
data class C(
val d: Int
)
}
and an instance of this class is being passed to a method which has the following signarure:
fun doSomethingMethod(object: A.B?): Mono<Unit> =
// do something
}
So now I am trying to initialize an instance of the data class A with only initializing B as wel but I dont understand how to do it. So far I have tried:
val testObject = A(A.B(5))
But its not working. Anyone has an idea?
objectas it is a keyword in kotlin for marking a singleton or creating an anonymous object.