Yes, you have a save cycle.
y.propertyOfTypeX = x
copies the value xto y.propertyOfTypeX, including the property x.propertyOfTypeY, which is a reference to y.
therefore
y.propertyOfTypeX?.propertyOfTypeY
occurs. What you have is essentially the same as
class Y {
var propertyOfTypeY: Y?
}
var y = Y()
y.propertyOfTypeY = y
, propertyOfTypeY a struct X
( x y).