Emit error in Swift 4 mode for final protocol extensions #8890
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an update to #8010 that should resolve SR-1762. The change makes the final protocol extension warning only occur in Swift 3 mode, otherwise the usual
final
error message is generated.I tried to take in the feedback from the other PR that tests in
test/Compatibility
must cover the complete functionality of the original. I made a separate testtest/attr/attr_final_protocol_extension.swift
and copied it intotest/Compatibility
to check the Swift 3 code path. It also seemed valid to copy over all oftest/attr/attr_final.swift
intotest/Compatibility
, but I chose to just do a subset since only a small slice of behavior changes. Glad to do anything that makes more sense here.Brian