File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -33,12 +33,12 @@ using namespace swift;
33
33
static EnumElementDecl *
34
34
extractEnumElement (TypeChecker &TC, SourceLoc UseLoc, const VarDecl *constant) {
35
35
if (auto Attr = AvailableAttr::isUnavailable (constant)) {
36
- auto Kind = Attr->getUnconditionalAvailability () ;
37
- if (Kind == UnconditionalAvailabilityKind::UnavailableInCurrentSwift ) {
38
- auto diag = TC.diagnose (UseLoc, diag::availability_decl_unavailable_rename,
39
- constant->getName (), /* " replaced" */ false ,
40
- /* special kind*/ 0 , Attr->Rename );
41
- diag .fixItReplace (UseLoc, Attr-> Rename );
36
+ auto Rename = Attr->Rename ;
37
+ if (!Rename. empty () ) {
38
+ TC.diagnose (UseLoc, diag::availability_decl_unavailable_rename,
39
+ constant->getName (), /* replaced*/ false ,
40
+ /* special kind*/ 0 , Attr->Rename )
41
+ .fixItReplace (UseLoc, Rename);
42
42
}
43
43
}
44
44
You can’t perform that action at this time.
0 commit comments