mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
* [Parse] Add diagnostic for mixed syntax availability attribute When parsing a list of availablity specifications in the shorthand syntax, check to see that the next specification is also in shorthand syntax. If the next specification looks like an explicit “deprecated” (or similad) attribute, then emit a specific diagnostic about it to help the developer understand the problem. https://bugs.swift.org/browse/SR-4231 * [Parse] Add fix-it for single mixed availability syntax For the scenario that’s described in SR-4231, when there is one shorthard syntax followed by ‘deprecated’ (or similar), then we can guess that the intention was to treat the shorthand as ‘introduced’ so that the two of them work together. This guess is only made if there is one platform version constrain, that is followed by ‘deprecated’, ‘renamed’, etc. but not ‘introduced’. https://bugs.swift.org/browse/SR-4231 * Automatic formatting using git-clang-format * Fix typos in test code and language in comment Also, consistently names test functions as “deprecated” and "introduced" * [Parse] Add note to explain the mixed availability syntax fix-it insertion This change also moves the fix-it from the error to the note.
81 KiB
81 KiB