If you convert the constructor to this: ``` compan...
# announcements
r
If you convert the constructor to this:
Copy code
companion object {
        fun from(currentSegmentIndex: Index, otherSegmentIndex: Index): OtherSegmentRelationshipToCurrent {
            return when (currentSegmentIndex - otherSegmentIndex) {
                -1 -> otherIsLeftNeighborOfCurrent
                0 -> otherIsCurrent
                1 -> otherIsRightNeighborOfCurrent
                else -> otherDoesNotTouchCurrent
            }
        }
    }
the enum works.