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 {
65056505 /* isAlias=*/ isa<TypeAliasDecl>(decl)));
65066506 }
65076507
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 ()) {
65126512 diag->limitBehavior (DiagnosticBehavior::Warning);
65136513 } else {
6514- diag->warnUntilSwiftVersion (7 );
6514+ diag->warnUntilSwiftVersion (getFeatureLanguageVersion (feature). value () );
65156515 }
65166516
65176517 emitInsertAnyFixit (*diag, T);
You can’t perform that action at this time.
0 commit comments