Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with Swift 5.0 #77

Merged
merged 3 commits into from Feb 22, 2019
Merged

Fix compatibility with Swift 5.0 #77

merged 3 commits into from Feb 22, 2019

Conversation

MaxDesiatov
Copy link
Collaborator

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. 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.

@codecov
Copy link

codecov bot commented Feb 21, 2019

Codecov Report

Merging #77 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #77      +/-   ##
=========================================
- Coverage   74.42%   74.4%   -0.02%     
=========================================
  Files          37      37              
  Lines        1736    1735       -1     
=========================================
- Hits         1292    1291       -1     
  Misses        444     444
Impacted Files Coverage Δ
Sources/XMLCoder/Decoder/XMLDecoder.swift 76.03% <100%> (ø) ⬆️
...es/XMLCoder/Decoder/XMLDecoderImplementation.swift 62.34% <100%> (-0.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a1f965...1a2e4ad. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 21, 2019

Codecov Report

Merging #77 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #77      +/-   ##
=========================================
- Coverage   74.42%   74.4%   -0.02%     
=========================================
  Files          37      37              
  Lines        1736    1735       -1     
=========================================
- Hits         1292    1291       -1     
  Misses        444     444
Impacted Files Coverage Δ
Sources/XMLCoder/Decoder/XMLDecoder.swift 76.03% <100%> (ø) ⬆️
...es/XMLCoder/Decoder/XMLDecoderImplementation.swift 62.34% <100%> (-0.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a1f965...710d977. Read the comment docs.

@hodovani hodovani assigned MaxDesiatov and unassigned hodovani Feb 22, 2019
@MaxDesiatov MaxDesiatov merged commit eafcdf1 into master Feb 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the swift5 branch February 22, 2019 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants