LanguageFeature.NonVariablePatternsToRightOfAsPatterns has shipped since F# 6.0 and is enabled for every selectable language version (the minimum accepted --langversion is 8.0). Its feature flag can therefore never be turned off, so it is dead configuration. This issue removes the flag and collapses the guarded code to its enabled behaviour.
What to remove
- The
NonVariablePatternsToRightOfAsPatterns case in LanguageFeatures.fs and LanguageFeatures.fsi
- Its entry in the
features map and its GetFeatureString arm
- The
featureNonVariablePatternsToRightOfAsPatterns string in FSComp.txt
- Every
SupportsFeature LanguageFeature.NonVariablePatternsToRightOfAsPatterns / checkLanguageFeatureAndRecover … NonVariablePatternsToRightOfAsPatterns guard — keep only the enabled path and delete the legacy branch
- Adjust affected tests and baselines accordingly
Consequence: --disableLanguageFeature:NonVariablePatternsToRightOfAsPatterns is no longer a recognised feature name.
Version mapping
|
LanguageFeature.NonVariablePatternsToRightOfAsPatterns, languageVersion60 |
Feature string
|
featureNonVariablePatternsToRightOfAsPatterns,"non-variable patterns to the right of 'as' patterns" |
Part of #20139
LanguageFeature.NonVariablePatternsToRightOfAsPatternshas shipped since F# 6.0 and is enabled for every selectable language version (the minimum accepted--langversionis 8.0). Its feature flag can therefore never be turned off, so it is dead configuration. This issue removes the flag and collapses the guarded code to its enabled behaviour.What to remove
NonVariablePatternsToRightOfAsPatternscase inLanguageFeatures.fsandLanguageFeatures.fsifeaturesmap and itsGetFeatureStringarmfeatureNonVariablePatternsToRightOfAsPatternsstring inFSComp.txtSupportsFeature LanguageFeature.NonVariablePatternsToRightOfAsPatterns/checkLanguageFeatureAndRecover … NonVariablePatternsToRightOfAsPatternsguard — keep only the enabled path and delete the legacy branchConsequence:
--disableLanguageFeature:NonVariablePatternsToRightOfAsPatternsis no longer a recognised feature name.Version mapping
fsharp/src/Compiler/Facilities/LanguageFeatures.fs
Line 184 in ea778bb
Feature string
fsharp/src/Compiler/FSComp.txt
Line 1253 in ea778bb
Part of #20139