Skip to content

Commit 86fedfd

Browse files
committed
Update LanguageFeature and release notes
1 parent c921606 commit 86fedfd

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

docs/release-notes/.FSharp.Compiler.Service/10.0.100.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Fix parsing errors using anonymous records and units of measures ([PR #18543](https://github.com/dotnet/fsharp/pull/18543))
88
* Fix parsing errors using anonymous records and code quotations ([PR #18603](https://github.com/dotnet/fsharp/pull/18603))
99
* Fixed: Allow `return`, `return!`, `yield`, `yield!` type annotations without parentheses ([PR #18533](https://github.com/dotnet/fsharp/pull/18533))
10-
* Allow `let!` and `use!` type annotations without requiring parentheses ([PR #18508](https://github.com/dotnet/fsharp/pull/18508))
10+
* Allow `let!`, `use!`, `and!` type annotations without requiring parentheses (([PR #18508](https://github.com/dotnet/fsharp/pull/18508) and [PR #18682](https://github.com/dotnet/fsharp/pull/18682)))
1111
* Fix find all references for F# exceptions ([PR #18565](https://github.com/dotnet/fsharp/pull/18565))
1212
* Shorthand lambda: fix completion for chained calls and analysis for unfinished expression ([PR #18560](https://github.com/dotnet/fsharp/pull/18560))
1313
* Completion: fix previous namespace considered opened [PR #18609](https://github.com/dotnet/fsharp/pull/18609)

docs/release-notes/.Language/preview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Warn when `unit` is passed to an `obj`-typed argument ([PR #18330](https://github.com/dotnet/fsharp/pull/18330))
99
* Fix parsing errors using anonymous records and units of measures ([PR #18543](https://github.com/dotnet/fsharp/pull/18543))
1010
* Scoped Nowarn: added the #warnon compiler directive ([Language suggestion #278](https://github.com/fsharp/fslang-suggestions/issues/278), [RFC FS-1146 PR](https://github.com/fsharp/fslang-design/pull/782), [PR #18049](https://github.com/dotnet/fsharp/pull/18049))
11-
* Allow `let!` and `use!` type annotations without requiring parentheses. ([PR #18508](https://github.com/dotnet/fsharp/pull/18508))
11+
* Allow `let!`, `use!`, `and!` type annotations without requiring parentheses (([PR #18508](https://github.com/dotnet/fsharp/pull/18508) and [PR #18682](https://github.com/dotnet/fsharp/pull/18682)))
1212

1313
### Fixed
1414

src/Compiler/Checking/Expressions/CheckComputationExpressions.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1794,7 +1794,7 @@ let rec TryTranslateComputationExpression
17941794
ceenv.cenv.g.langVersion.SupportsFeature LanguageFeature.UseBangBindingValueDiscard
17951795

17961796
let supportsTypedLetOrUseBang =
1797-
ceenv.cenv.g.langVersion.SupportsFeature LanguageFeature.AllowTypedLetOrUseBang
1797+
ceenv.cenv.g.langVersion.SupportsFeature LanguageFeature.AllowTypedLetUseAndBang
17981798

17991799
// use! x = ...
18001800
// use! (x) = ...

src/Compiler/Facilities/LanguageFeatures.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ type LanguageFeature =
102102
| UseBangBindingValueDiscard
103103
| BetterAnonymousRecordParsing
104104
| ScopedNowarn
105-
| AllowTypedLetOrUseBang
105+
| AllowTypedLetUseAndBang
106106

107107
/// LanguageVersion management
108108
type LanguageVersion(versionText) =
@@ -236,7 +236,7 @@ type LanguageVersion(versionText) =
236236
LanguageFeature.UseBangBindingValueDiscard, previewVersion
237237
LanguageFeature.BetterAnonymousRecordParsing, previewVersion
238238
LanguageFeature.ScopedNowarn, previewVersion
239-
LanguageFeature.AllowTypedLetOrUseBang, previewVersion
239+
LanguageFeature.AllowTypedLetUseAndBang, previewVersion
240240
]
241241

242242
static let defaultLanguageVersion = LanguageVersion("default")
@@ -402,7 +402,7 @@ type LanguageVersion(versionText) =
402402
| LanguageFeature.UseBangBindingValueDiscard -> FSComp.SR.featureUseBangBindingValueDiscard ()
403403
| LanguageFeature.BetterAnonymousRecordParsing -> FSComp.SR.featureBetterAnonymousRecordParsing ()
404404
| LanguageFeature.ScopedNowarn -> FSComp.SR.featureScopedNowarn ()
405-
| LanguageFeature.AllowTypedLetOrUseBang -> FSComp.SR.featureAllowLetOrUseBangTypeAnnotationWithoutParens ()
405+
| LanguageFeature.AllowTypedLetUseAndBang -> FSComp.SR.featureAllowLetOrUseBangTypeAnnotationWithoutParens ()
406406

407407
/// Get a version string associated with the given feature.
408408
static member GetFeatureVersionString feature =

src/Compiler/Facilities/LanguageFeatures.fsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ type LanguageFeature =
9393
| UseBangBindingValueDiscard
9494
| BetterAnonymousRecordParsing
9595
| ScopedNowarn
96-
| AllowTypedLetOrUseBang
96+
| AllowTypedLetUseAndBang
9797

9898
/// LanguageVersion management
9999
type LanguageVersion =

src/Compiler/pars.fsy

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4115,7 +4115,7 @@ moreBinders:
41154115
match $3 with
41164116
| None -> $2
41174117
| Some (_, SynReturnInfo((ty, _), _)) ->
4118-
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang ty.Range
4118+
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetUseAndBang ty.Range
41194119
SynPat.Typed($2, ty, unionRanges $2.Range ty.Range)
41204120
let mEquals = rhs parseState 4
41214121
let m = unionRanges (rhs parseState 1) $5.Range
@@ -4141,7 +4141,7 @@ moreBinders:
41414141
match $3 with
41424142
| None -> $2
41434143
| Some (_, SynReturnInfo((ty, _), _)) ->
4144-
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang ty.Range
4144+
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetUseAndBang ty.Range
41454145
SynPat.Typed($2, ty, unionRanges $2.Range ty.Range)
41464146
let mEquals = rhs parseState 4
41474147
let m = unionRanges (rhs parseState 1) $5.Range
@@ -4461,7 +4461,7 @@ declExpr:
44614461
| YIELD declExpr COLON typ
44624462
{ let trivia: SynExprYieldOrReturnTrivia = { YieldOrReturnKeyword = rhs parseState 1 }
44634463
let typedExpr = SynExpr.Typed($2, $4, unionRanges $2.Range $4.Range)
4464-
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang typedExpr.Range
4464+
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetUseAndBang typedExpr.Range
44654465
SynExpr.YieldOrReturn(($1, not $1), typedExpr, (unionRanges (rhs parseState 1) $4.Range), trivia) }
44664466

44674467
| YIELD declExpr opt_topReturnTypeWithTypeConstraints
@@ -4471,7 +4471,7 @@ declExpr:
44714471
| None -> $2
44724472
| Some(_, SynReturnInfo((ty, _), m)) ->
44734473
let m = unionRanges $2.Range m
4474-
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang m
4474+
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetUseAndBang m
44754475
SynExpr.Typed($2, ty, m)
44764476
SynExpr.YieldOrReturn(($1, not $1), expr, (unionRanges (rhs parseState 1) expr.Range), trivia) }
44774477

@@ -4488,7 +4488,7 @@ declExpr:
44884488
| YIELD_BANG declExpr COLON typ
44894489
{ let trivia: SynExprYieldOrReturnFromTrivia = { YieldOrReturnFromKeyword = rhs parseState 1 }
44904490
let typedExpr = SynExpr.Typed($2, $4, unionRanges $2.Range $4.Range)
4491-
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang typedExpr.Range
4491+
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetUseAndBang typedExpr.Range
44924492
SynExpr.YieldOrReturnFrom(($1, not $1), typedExpr, (unionRanges (rhs parseState 1) $2.Range), trivia) }
44934493

44944494
| YIELD_BANG declExpr opt_topReturnTypeWithTypeConstraints
@@ -4498,7 +4498,7 @@ declExpr:
44984498
| None -> $2
44994499
| Some(_, SynReturnInfo((ty, _), m)) ->
45004500
let m = unionRanges $2.Range m
4501-
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang m
4501+
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetUseAndBang m
45024502
SynExpr.Typed($2, ty, m)
45034503
SynExpr.YieldOrReturnFrom(($1, not $1), expr, (unionRanges (rhs parseState 1) $2.Range), trivia) }
45044504

@@ -4534,7 +4534,7 @@ declExpr:
45344534
| None -> $2
45354535
| Some (_, SynReturnInfo((ty, _), _)) ->
45364536
SynPat.Typed($2, ty, unionRanges $2.Range ty.Range)
4537-
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang pat.Range
4537+
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetUseAndBang pat.Range
45384538
let mEquals = rhs parseState 4
45394539
let m = unionRanges (rhs parseState 1) $9.Range
45404540
let trivia: SynExprLetOrUseBangTrivia = { LetOrUseBangKeyword = rhs parseState 1 ; EqualsRange = Some mEquals }
@@ -4551,7 +4551,7 @@ declExpr:
45514551
| None -> $2
45524552
| Some (_, SynReturnInfo((ty, _), _)) ->
45534553
SynPat.Typed($2, ty, unionRanges $2.Range ty.Range)
4554-
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetOrUseBang pat.Range
4554+
parseState.LexBuffer.CheckLanguageFeatureAndRecover LanguageFeature.AllowTypedLetUseAndBang pat.Range
45554555
let mEquals = rhs parseState 4
45564556
let m = unionRanges (rhs parseState 1) $9.Range
45574557
let trivia: SynExprLetOrUseBangTrivia = { LetOrUseBangKeyword = rhs parseState 1 ; EqualsRange = Some mEquals }

0 commit comments

Comments
 (0)