Skip to content

Commit b8f7ad6

Browse files
committed
Update CheckComputationExpressions.fs
1 parent b3db637 commit b8f7ad6

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Compiler/Checking/Expressions/CheckComputationExpressions.fs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1435,12 +1435,29 @@ let rec TryTranslateComputationExpression
14351435

14361436
SynExpr.LetOrUse(false, false, true, true, [ condBinding ], whileExpr, mGuard, SynExprLetOrUseTrivia.Zero)
14371437

1438+
let firstBinding =
1439+
SynBinding(
1440+
accessibility = None,
1441+
kind = SynBindingKind.Normal,
1442+
isInline = false,
1443+
isMutable = false,
1444+
attributes = [],
1445+
xmlDoc = PreXmlDoc.Empty,
1446+
valData = SynInfo.emptySynValData,
1447+
headPat = patFirst,
1448+
returnInfo = None,
1449+
expr = guardExpr,
1450+
range = mGuard,
1451+
debugPoint = DebugPointAtBinding.NoneAtSticky,
1452+
trivia = SynBindingTrivia.Zero
1453+
)
1454+
14381455
SynExpr.LetOrUse(
14391456
false,
14401457
false, // Pass through the isUse flag from binding info
14411458
true, // isFromSource is true for user-written code
14421459
true, // isComputed is true for bang let/let!
1443-
[],
1460+
[ firstBinding ],
14441461
body,
14451462
mGuard,
14461463
SynExprLetOrUseTrivia.Zero

0 commit comments

Comments
 (0)