-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update to Swift 5 #22
base: master
Are you sure you want to change the base?
Conversation
Oh, the tests cause a crash because Completer is not fixed yet. |
That was just a fix for the warnings in Completer. The tests still crash. |
Only these two tests crash:
It's an index-out-of-bounds error, by the way. |
Another thought, for anyone reading this, maybe someone knows: The cause must be some change between Swift 3 and Swift 4.2, I think, because the tests used to pass back then. I hope I find the time to look further into it. |
Oh, of course the problem could have been introduced by dff687b ... That's actually quite likely, I almost forgot about that. |
dff687b seems correct, though. Next step: I must look at the two crashing tests and inspect their results. Maybe at some point in the next days. |
I wonder if this is a Swift bug.
the test crashes with "String index is out of bounds" when trying to use the selection, for example with But when I do
the test passes, and But the utf16.count is the same for both strings, as well as the count, and they are even ==. Still when I do
it works for the string that has been changed by The problem is, I need to use EDIT: |
Here is a playground in which I tried to show the bug as clearly as possible. https://github.com/lewisbar/ReplacingCharactersBug |
I've made a few updates to switch to Swift 5, the biggest being replacing "Hashable.hashValue" with "hash(into:)". I hope I did everything correctly there.
I have not yet seen into updating Completer, I'd have to do some reading about Strings first.