https://kotlinlang.org logo
s

sargunv

02/16/2016, 4:26 PM
Say I have
data class A (val f: B)
and
data class B (val f: A)
. I want to initialize local
var a: A
and
var b: B
such that
a.f
is
b
and
b.f
is
a
.
A.f
and
B.f
must remain vals. Is this circular instantiation possible?