You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also receiving the same error in the same example. I was testing using the example because I was getting something strange in my own code where .replaceError appeared to do nothing. I thought if the example was Ok, then it was something I'm doing wrong, but now I'm not sure...
Hi @griffrawk & @russellyeo, this unfortunately seems to be a Swift compiler bug in @rethrows. That is a mechanism to allow one to have throwing requirements in protocols such that if a conformance does not actually throw then you don't need try. That is why you don't have to try the .parse even though typically parsing is a failable operation.
This may be reason enough to remove @rethrows from the library, which we can do someday (or if someone wants to PR it!), but in the meantime you could also just copy-paste ReplaceError into your own project and add a throws to the parse. That alone will fix the issue.
I have encountered a crash when using
replaceError(with:)
, and can reproduce it using the example documented in theOneOf
parser.Using a SPM executable package on Xcode 15.0.1 (15A507)
I tried stepping through the library code to try see if I could find the root cause, but I think it is beyond my ability/understanding!
Thanks,
Russell
The text was updated successfully, but these errors were encountered: