Skip to content

Commit 45ad26f

Browse files
committed
wip
1 parent 2b5a42b commit 45ad26f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/Compiler/Checking/Expressions/CheckComputationExpressions.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ let (|OptionalSequential|) e =
853853
| SynExpr.Sequential(debugPoint = _sp; isTrueSeq = true; expr1 = dataComp1; expr2 = dataComp2) -> (dataComp1, Some dataComp2)
854854
| _ -> (e, None)
855855

856-
let private getTypedHeadPattern (SynBinding(headPat = headPattern; returnInfo = returnInfo)) =
856+
let private mkTypedHeadPat (SynBinding(headPat = headPattern; returnInfo = returnInfo)) =
857857
match returnInfo with
858858
| None -> headPattern
859859
| Some(SynBindingReturnInfo(typeName = typeName; range = range)) ->
@@ -871,7 +871,7 @@ let (|ExprAsUseBang|_|) expr =
871871
trivia = { LetOrUseKeyword = mBind }) ->
872872
match bindings with
873873
| SynBinding(debugPoint = spBind; expr = rhsExpr) as binding :: andBangs ->
874-
let pat = getTypedHeadPattern binding
874+
let pat = mkTypedHeadPat binding
875875
ValueSome(spBind, isFromSource, pat, rhsExpr, andBangs, innerComp, mBind)
876876
| _ -> ValueNone
877877
| _ -> ValueNone
@@ -888,7 +888,7 @@ let (|ExprAsLetBang|_|) expr =
888888
trivia = { LetOrUseKeyword = mBind }) ->
889889
match bindings with
890890
| SynBinding(debugPoint = spBind; expr = letRhsExpr) as binding :: andBangBindings ->
891-
let letPat = getTypedHeadPattern binding
891+
let letPat = mkTypedHeadPat binding
892892
ValueSome(spBind, isFromSource, letPat, letRhsExpr, andBangBindings, innerComp, mBind)
893893
| _ -> ValueNone
894894
| _ -> ValueNone
@@ -2013,7 +2013,7 @@ let rec TryTranslateComputationExpression
20132013
|> List.map (fun expr -> mkSourceExprConditional isFromSource expr ceenv.sourceMethInfo ceenv.builderValName)
20142014

20152015
let pats =
2016-
letPat :: [ for binding in andBangBindings -> getTypedHeadPattern binding ]
2016+
letPat :: [ for binding in andBangBindings -> mkTypedHeadPat binding ]
20172017

20182018
let sourcesRange = sources |> List.map (fun e -> e.Range) |> List.reduce unionRanges
20192019

tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ but here has type
20762076
]
20772077

20782078
[<Fact>]
2079-
let ``Preview: let! return type check error 01`` () =
2079+
let ``Preview: let! return type mismatch error 01`` () =
20802080
FSharp """
20812081
module Test
20822082
@@ -2100,7 +2100,7 @@ but here has type
21002100
]
21012101

21022102
[<Fact>]
2103-
let ``Preview: let! return type check error 02`` () =
2103+
let ``Preview: let! return type mismatch error 02`` () =
21042104
FSharp """
21052105
module Test
21062106
@@ -2124,7 +2124,7 @@ but here has type
21242124
]
21252125

21262126
[<Fact>]
2127-
let ``Preview: let! return type check error 03`` () =
2127+
let ``Preview: let! return type mismatch error 03`` () =
21282128
FSharp """
21292129
module Test
21302130
@@ -2148,7 +2148,7 @@ but here has type
21482148
]
21492149

21502150
[<Fact>]
2151-
let ``Preview: let!-and! return type check error 01`` () =
2151+
let ``Preview: let!-and! return type mismatch error 01`` () =
21522152
FSharp """
21532153
module Test
21542154
@@ -2180,7 +2180,7 @@ but here has type
21802180
]
21812181

21822182
[<Fact>]
2183-
let ``Preview: let!-and! return type check error 02`` () =
2183+
let ``Preview: let!-and! return type mismatch error 02`` () =
21842184
FSharp """
21852185
module Test
21862186
@@ -2210,7 +2210,7 @@ but here has type
22102210
]
22112211

22122212
[<Fact>]
2213-
let ``Preview: let!-and! return type check error 03`` () =
2213+
let ``Preview: let!-and! return type mismatch error 03`` () =
22142214
FSharp """
22152215
module Test
22162216

0 commit comments

Comments
 (0)