I reverted the commit and faced the same types of many errors when compiling Swift:
.../swift/stdlib/public/core/Array.swift:371:5: error: cannot assign to immutable expression of type '_.Type'
_ = _checkSubscript(index, wasNativeTypeChecked: true)
^
.../swift/stdlib/public/core/Array.swift:371:9: error: cannot assign value of type '_DependenceToken' to type '_.Type'
_ = _checkSubscript(index, wasNativeTypeChecked: true)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../swift/stdlib/public/core/ArraySlice.swift:952:5: error: cannot assign to immutable expression of type '_.Type'
_ = _buffer.beginCOWMutation()
^
Do you know how to avoid it?