Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compatibility with Swift 5.0 (#77)
When XMLCoder is compiled in Swift 5.0 mode it causes infinite loops in some tests, apparently due to change in `try?` behaviour introduced in SE-0230 Swift Evolution Proposal. In generic `unbox` handling of the `String` case with `try? unbox(box)` is always inferred as a call to `unbox<String?>` instead of a call to `unbox<String>`, as it was in Swift 4.2 mode. This is now fixed with rearranged type hints in this call. Also applied Swift 5.0 migrator suggestion to change `index` to `firstIndex`. * Fix compatibility with Swift 5.0 * Cleanup print usage, add Swift v5 to Package.swift
- Loading branch information
1 parent
7a1f965
commit eafcdf1
Showing
4 changed files
with
4 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters