File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6505,13 +6505,13 @@ class ExistentialTypeSyntaxChecker : public ASTWalker {
6505
6505
/* isAlias=*/ isa<TypeAliasDecl>(decl)));
6506
6506
}
6507
6507
6508
- // If the feature is enabled in adoption mode, warn unconditionally.
6509
- // Otherwise, until Swift 7 .
6510
- if (Ctx. LangOpts . getFeatureState ( Feature::ExistentialAny)
6511
- .isEnabledForAdoption ()) {
6508
+ // If `ExistentialAny` is enabled in adoption mode, warn unconditionally.
6509
+ // Otherwise, warn until the feature's coming-of-age language mode .
6510
+ const auto feature = Feature::ExistentialAny;
6511
+ if (Ctx. LangOpts . getFeatureState (feature) .isEnabledForAdoption ()) {
6512
6512
diag->limitBehavior (DiagnosticBehavior::Warning);
6513
6513
} else {
6514
- diag->warnUntilSwiftVersion (7 );
6514
+ diag->warnUntilSwiftVersion (getFeatureLanguageVersion (feature). value () );
6515
6515
}
6516
6516
6517
6517
emitInsertAnyFixit (*diag, T);
You can’t perform that action at this time.
0 commit comments