Skip to content

Releases: profoto/SourceKitten

Updated Yams version

13 Aug 11:12
33c82f0
Compare
Choose a tag to compare
Fix type on Linux with Swift 5.2 (#660)

With Swift 5.2 this code produced this warning:

```
Source/SourceKittenFramework/CodeCompletionItem.swift:65:65: error: cast from 'SourceKitRepresentable?' to unrelated type 'CodeCompletionItem.NumBytesInt' (aka 'Int') always fails
                numBytesToErase: dict["key.num_bytes_to_erase"] as? NumBytesInt)
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^   ~~~~~~~~~~~
```

Switching this to use `Int64` as it does on Darwin seems to fix this.
I've left the conditional here for older versions of Swift on Linux

https://github.com/jpsim/sourcekitten/commit/61b3edf36f4042b7069d9deaa41df5b758542d91