我在Kotlin中编写了红黑树。FuninsertFixup在插入新元素后恢复平衡(z:Node?是新元素)。树平衡算法取自here(第2-3页)。问题是Kotlin不允许我重新分配z到z.parent和z。父.父。我希望z成为指针。问题是如何让Kotlin明白我想从他那里得到什么?classNode(key:Int){...}classBinarySearchTree{varroot:Node?=nullfuninsert(newNode:Node){...}funRotateLeft(x:Node?){...}funRotateRight(x:Node?){...}funinser