XCode Error: Failed to produce diagnostic for expression; please file a bug report

In our case, we were calling an extension function on an array in a viewmodel. In a SwiftUI view we were doing Text(viewModel.someArray.extensionFunction()). The problem was that I had renamed someArray to someBetterNamedArray and it couldn’t handle it.