That first error isn’t an Xcode issue. It’s a Swift compiler issue. And you can’t blame your IDE for your bad instincts—at some point those ritualistic fixes stopped being necessary and I haven’t had to do them for more than half a decade. You really should be digging into your code using breakpoints and logging to find the root cause.
I do think Xcode has very rough edges but if we’re criticizing it, we have to criticize the right points.