diff --git a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs index a2cd83176a89..a01b3939703d 100644 --- a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs @@ -1854,7 +1854,14 @@ let rec TryTranslateComputationExpression // or // --> build.BindReturn(e1, (fun _argN -> match _argN with pat -> expr-without-return)) | SynExpr.LetOrUseBang( - bindDebugPoint = spBind; isUse = false; isFromSource = isFromSource; pat = pat; rhs = rhsExpr; andBangs = []; body = innerComp; trivia = { LetOrUseBangKeyword = mBind }) -> + bindDebugPoint = spBind + isUse = false + isFromSource = isFromSource + pat = pat + rhs = rhsExpr + andBangs = [] + body = innerComp + trivia = { LetOrUseBangKeyword = mBind }) -> if ceenv.isQuery then error (Error(FSComp.SR.tcBindMayNotBeUsedInQueries (), mBind)) diff --git a/src/Compiler/SyntaxTree/SyntaxTrivia.fs b/src/Compiler/SyntaxTree/SyntaxTrivia.fs index 880798644299..bbc5f8ea0ceb 100644 --- a/src/Compiler/SyntaxTree/SyntaxTrivia.fs +++ b/src/Compiler/SyntaxTree/SyntaxTrivia.fs @@ -97,7 +97,11 @@ type SynExprLetOrUseBangTrivia = EqualsRange: range option } - static member Zero: SynExprLetOrUseBangTrivia = { LetOrUseBangKeyword = Range.Zero; EqualsRange = None } + static member Zero: SynExprLetOrUseBangTrivia = + { + LetOrUseBangKeyword = Range.Zero + EqualsRange = None + } [] type SynExprMatchTrivia =