Sema: fix `@errorCast` with error unions

Resolves: #20169
5317d88414mlugg committed on 2/5/2025, 9:17:40 PMparentfbbf34e
2 files changedLine totals unavailable