Skip to content

Commit 695d84c

Browse files
T-GroCopilotCopilotabonie
authored
Remove obsolete static let language feature flag (#20512)
* Remove obsolete static let language feature flag Fixes #20187 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Teach expert reviewers to check runtime representation preservation (#20511) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Adam Boniecki <20281641+abonie@users.noreply.github.com> Copilot-Session: 0c807a40-c7e7-4b79-9726-945451f294e2
1 parent 721adfa commit 695d84c

17 files changed

Lines changed: 0 additions & 139 deletions

‎src/Compiler/Checking/CheckDeclarations.fs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,9 +1166,6 @@ module MutRecBindingChecking =
11661166
if isStatic && isExtrinsic then
11671167
errorR(Error(FSComp.SR.tcStaticBindingInExtrinsicAugmentation(), m))
11681168

1169-
elif isStatic && incrCtorInfoOpt.IsNone && not (g.langVersion.SupportsFeature(LanguageFeature.StaticLetInRecordsDusEmptyTypes)) then
1170-
errorR(Error(FSComp.SR.tcStaticLetBindingsRequireClassesWithImplicitConstructors(), m))
1171-
11721169
// Phase2A: let-bindings - pass through
11731170
let innerState = (incrCtorInfoOpt, envForTycon, tpenv, recBindIdx, uncheckedBindsRev)
11741171
[Phase2AIncrClassBindings (tcref, letBinds, isStatic, isRec, m)], innerState

‎src/Compiler/FSComp.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,6 @@ tcTypeAbbreviationsCheckedAtCompileTime,"As of F# 4.1, the accessibility of type
753753
897,tcMeasureDeclarationsRequireStaticMembers,"Measure declarations may have only static members"
754754
tcStructsMayNotContainDoBindings,"Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings"
755755
901,tcStructsMayNotContainLetBindings,"Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type."
756-
902,tcStaticLetBindingsRequireClassesWithImplicitConstructors,"For F#7 and lower, static 'let','do' and 'member val' definitions may only be used in types with a primary constructor ('type X(args) = ...'). To enable them in all other types, use language version '8' or higher."
757756
904,tcMeasureDeclarationsRequireStaticMembersNotConstructors,"Measure declarations may have only static members: constructors are not available"
758757
905,tcMemberAndLocalClassBindingHaveSameName,"A member and a local class binding both have the name '%s'"
759758
906,tcTypeAbbreviationsCannotHaveInterfaceDeclaration,"Type abbreviations cannot have interface declarations"
@@ -1694,7 +1693,6 @@ reprStateMachineInvalidForm,"The state machine has an unexpected form"
16941693
3563,lexInvalidIdentifier,"This is not a valid identifier"
16951694
3564,parsMissingUnionCaseName,"Missing union case name"
16961695
3565,parsExpectingType,"Expecting type"
1697-
featureStaticLetInRecordsDusEmptyTypes,"Allow static let bindings in union, record, struct, non-incremental-class types"
16981696
3566,tcMultipleRecdTypeChoice,"Multiple type matches were found:\n%s\nThe type '%s' was used. Due to the overlapping field names\n%s\nconsider using type annotations or change the order of open statements."
16991697
3567,parsMissingMemberBody,"Expecting member body"
17001698
3568,parsMissingKeyword,"Missing keyword '%s'"

‎src/Compiler/Facilities/LanguageFeatures.fs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ type LanguageFeature =
3737
| NonInlineLiteralsAsPrintfFormat
3838
| WarningWhenMultipleRecdTypeChoice
3939
| ConstraintIntersectionOnFlexibleTypes
40-
| StaticLetInRecordsDusEmptyTypes
4140
| WarningWhenTailRecAttributeButNonTailRecUsage
4241
| UnmanagedConstraintCsharpInterop
4342
| ReuseSameFieldsInStructUnions
@@ -145,7 +144,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
145144
LanguageFeature.NonInlineLiteralsAsPrintfFormat, languageVersion80
146145
LanguageFeature.WarningWhenMultipleRecdTypeChoice, languageVersion80
147146
LanguageFeature.WarningWhenTailRecAttributeButNonTailRecUsage, languageVersion80
148-
LanguageFeature.StaticLetInRecordsDusEmptyTypes, languageVersion80
149147
LanguageFeature.ConstraintIntersectionOnFlexibleTypes, languageVersion80
150148

151149
// F# 9.0
@@ -317,7 +315,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
317315
FSComp.SR.featureWarningWhenCopyAndUpdateRecordChangesAllFields ()
318316
| LanguageFeature.NonInlineLiteralsAsPrintfFormat -> FSComp.SR.featureNonInlineLiteralsAsPrintfFormat ()
319317
| LanguageFeature.WarningWhenMultipleRecdTypeChoice -> FSComp.SR.featureWarningWhenMultipleRecdTypeChoice ()
320-
| LanguageFeature.StaticLetInRecordsDusEmptyTypes -> FSComp.SR.featureStaticLetInRecordsDusEmptyTypes ()
321318
| LanguageFeature.ConstraintIntersectionOnFlexibleTypes -> FSComp.SR.featureConstraintIntersectionOnFlexibleTypes ()
322319
| LanguageFeature.WarningWhenTailRecAttributeButNonTailRecUsage -> FSComp.SR.featureChkNotTailRecursive ()
323320
| LanguageFeature.UnmanagedConstraintCsharpInterop -> FSComp.SR.featureUnmanagedConstraintCsharpInterop ()

‎src/Compiler/Facilities/LanguageFeatures.fsi‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ type LanguageFeature =
2727
| NonInlineLiteralsAsPrintfFormat
2828
| WarningWhenMultipleRecdTypeChoice
2929
| ConstraintIntersectionOnFlexibleTypes
30-
| StaticLetInRecordsDusEmptyTypes
3130
| WarningWhenTailRecAttributeButNonTailRecUsage
3231
| UnmanagedConstraintCsharpInterop
3332
| ReuseSameFieldsInStructUnions

‎src/Compiler/xlf/FSComp.txt.cs.xlf‎

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.de.xlf‎

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.es.xlf‎

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.fr.xlf‎

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.it.xlf‎

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.ja.xlf‎

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)