Skip to content

Commit df22591

Browse files
committed
wip
1 parent 4de226a commit df22591

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
@@ -2011,7 +2011,7 @@ let rec TryTranslateComputationExpression
20112011
|> List.map (fun expr -> mkSourceExprConditional isFromSource expr ceenv.sourceMethInfo ceenv.builderValName)
20122012

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

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

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2032,7 +2032,7 @@ match test() with
20322032
|> shouldSucceed
20332033

20342034
[<Fact>]
2035-
let ``Preview: let! return type check error 01`` () =
2035+
let ``Preview: let! return type mismatch error 01`` () =
20362036
FSharp """
20372037
module Test
20382038
@@ -2056,7 +2056,7 @@ but here has type
20562056
]
20572057

20582058
[<Fact>]
2059-
let ``Preview: let! return type check error 02`` () =
2059+
let ``Preview: let! return type mismatch error 02`` () =
20602060
FSharp """
20612061
module Test
20622062
@@ -2080,7 +2080,7 @@ but here has type
20802080
]
20812081

20822082
[<Fact>]
2083-
let ``Preview: let! return type check error 03`` () =
2083+
let ``Preview: let! return type mismatch error 03`` () =
20842084
FSharp """
20852085
module Test
20862086
@@ -2104,7 +2104,7 @@ but here has type
21042104
]
21052105

21062106
[<Fact>]
2107-
let ``Preview: let!-and! return type check error 01`` () =
2107+
let ``Preview: let!-and! return type mismatch error 01`` () =
21082108
FSharp """
21092109
module Test
21102110
@@ -2136,7 +2136,7 @@ but here has type
21362136
]
21372137

21382138
[<Fact>]
2139-
let ``Preview: let!-and! return type check error 02`` () =
2139+
let ``Preview: let!-and! return type mismatch error 02`` () =
21402140
FSharp """
21412141
module Test
21422142
@@ -2166,7 +2166,7 @@ but here has type
21662166
]
21672167

21682168
[<Fact>]
2169-
let ``Preview: let!-and! return type check error 03`` () =
2169+
let ``Preview: let!-and! return type mismatch error 03`` () =
21702170
FSharp """
21712171
module Test
21722172

0 commit comments

Comments
 (0)