[swift-dev] [SR-479] Ownership keywords in protocols. Swift 5 mode?
gspiers at gmail.com
Sun Aug 13 04:26:03 CDT 2017
Hoping to get some guidance around a bug fix. Sorry if some of the
questions are a bit basic, I’m new here :)
I’ve opened a [draft
proposal](https://github.com/apple/swift-evolution/pull/707) on Swift
Evolution GitHub repository to fix SR-479. As all proposals need an
implementation I started work on it.
Ted Kremenek commented on the above pull request and suggested a good
implementation would produce a warning for existing Swift modes and an
error in Swift 5 mode (with fixits for both of course).
What I’m stuck on is I don’t believe there’s currently a Swift 5 mode,
at least not on master. Is that correct?
currently warns on Swift 3 and errors on Swift 4. I’d have to bump
these versions when a Swift 5 mode is introduced.
Am I missing something, is there a way to detect a future Swift mode?
I’ve tried calling the compiler directly passing in 5 for the swift
mode and it tells me valid args are only 3 and 4.
I’d also appreciate any feedback or comments if someone has time to
look at the implementation and tests.
More information about the swift-dev