Skip to content

Commit ddf1526

Browse files
T-GroCopilotCopilot
authored
Remove always-on DotlessFloat32Literal language feature flag (#20441)
* Remove always-on DotlessFloat32Literal language feature flag The DotlessFloat32Literal feature shipped in F# 5.0. Since the minimum accepted --langversion is now 8.0, the flag is permanently enabled and is dead configuration. Remove the LanguageFeature case, its features-map entry, and GetFeatureString arm, and collapse the gated lexer rule into a single always-on ieee32 rule by folding the dotless-integer case into the ieee32 regex. Regenerated xlf localization files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Re-trigger CI: supersede stale pre-label check_release_notes run The prior check_release_notes failure ran before the NO_RELEASE_NOTES label existed. This empty commit advances the head SHA so the check re-runs with the label present (opt-out) and passes. No release notes are added (label opts this cleanup PR out). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a2806ef commit ddf1526

17 files changed

Lines changed: 1 addition & 80 deletions

‎src/Compiler/FSComp.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,6 @@ optsAlwaysInline,"Always inline 'inline' functions"
15571557
nativeResourceFormatError,"Stream does not begin with a null resource and is not in '.RES' format."
15581558
nativeResourceHeaderMalformed,"Resource header beginning at offset %s is malformed."
15591559
formatDashItem," - %s"
1560-
featureDotlessFloat32Literal,"dotless float32 literal"
15611560
featurePackageManagement,"package management"
15621561
featureFromEndSlicing,"from-end slicing"
15631562
featureNullnessChecking,"nullness checking"

‎src/Compiler/Facilities/LanguageFeatures.fs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ module internal FSharp.Compiler.Features
1616

1717
[<RequireQualifiedAccess>]
1818
type LanguageFeature =
19-
| DotlessFloat32Literal
2019
| PackageManagement
2120
| FromEndSlicing
2221
| ResumableStateMachines
@@ -124,7 +123,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
124123
dict
125124
[
126125
// F# 5.0
127-
LanguageFeature.DotlessFloat32Literal, languageVersion50
128126
LanguageFeature.DefaultInterfaceMemberConsumption, languageVersion50
129127
LanguageFeature.PackageManagement, languageVersion50
130128
LanguageFeature.WitnessPassing, languageVersion50
@@ -302,7 +300,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
302300
/// Get a string name for the given feature.
303301
static member GetFeatureString feature =
304302
match feature with
305-
| LanguageFeature.DotlessFloat32Literal -> FSComp.SR.featureDotlessFloat32Literal ()
306303
| LanguageFeature.PackageManagement -> FSComp.SR.featurePackageManagement ()
307304
| LanguageFeature.FromEndSlicing -> FSComp.SR.featureFromEndSlicing ()
308305
| LanguageFeature.NullnessChecking -> FSComp.SR.featureNullnessChecking ()

‎src/Compiler/Facilities/LanguageFeatures.fsi‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module internal FSharp.Compiler.Features
66
/// LanguageFeature enumeration
77
[<RequireQualifiedAccess>]
88
type LanguageFeature =
9-
| DotlessFloat32Literal
109
| PackageManagement
1110
| FromEndSlicing
1211
| ResumableStateMachines

‎src/Compiler/lex.fsl‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,7 @@ let bignum = integer ('I' | 'N' | 'Z' | 'Q' | 'R' | 'G')
290290

291291
let ieee64 = float
292292

293-
let ieee32 = float ('f' | 'F')
294-
295-
let ieee32_dotless_no_exponent = integer ('f' | 'F')
293+
let ieee32 = (float | integer) ('f' | 'F')
296294

297295
let decimal = (float | integer) ('m' | 'M')
298296

@@ -476,13 +474,6 @@ rule token (args: LexArgs) (skip: bool) = parse
476474
| ieee32
477475
{ IEEE32 (evalFloat args lexbuf) }
478476

479-
| ieee32_dotless_no_exponent
480-
{ if lexbuf.SupportsFeature LanguageFeature.DotlessFloat32Literal then
481-
IEEE32 (evalFloat args lexbuf)
482-
else
483-
fail args lexbuf (FSComp.SR.lexInvalidFloat()) (IEEE32 0.0f)
484-
}
485-
486477
| ieee64
487478
{ IEEE64 (try float(lexeme lexbuf) with _ -> fail args lexbuf (FSComp.SR.lexInvalidFloat()) 0.0) }
488479

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

Lines changed: 0 additions & 5 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 & 5 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 & 5 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 & 5 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 & 5 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 & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)