Skip to content

Commit 68514a6

Browse files
committed
Confirms that dobang is not, in fact, simple (#9413)
* I can confirm that dobang is not, in fact, simple * add test to verify do-bang behavior
1 parent 9f819b5 commit 68514a6

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/fsharp/TypeChecker.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8883,6 +8883,7 @@ and TcComputationExpression cenv env overallTy mWhole (interpExpr: Expr) builder
88838883
clauses |> List.forall (fun (Clause(_, _, clauseComp, _, _)) -> isSimpleExpr clauseComp)
88848884
| SynExpr.YieldOrReturnFrom _ -> false
88858885
| SynExpr.YieldOrReturn _ -> false
8886+
| SynExpr.DoBang _ -> false
88868887
| _ -> true
88878888

88888889
let basicSynExpr =

tests/FSharp.Test.Utilities/CompilerAssert.fs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ let main argv = 0"""
419419
static member ExecutionHasOutput(cmpl: Compilation, expectedOutput: string) =
420420
CompilerAssert.Execute(cmpl, newProcess = true, onOutput = (fun output -> Assert.AreEqual(expectedOutput, output)))
421421

422+
/// Assert that the given source code compiles with the `defaultProjectOptions`, with no errors or warnings
422423
static member Pass (source: string) =
423424
lock gate <| fun () ->
424425
let parseResults, fileAnswer = checker.ParseAndCheckFileInProject("test.fs", 0, SourceText.ofString source, defaultProjectOptions) |> Async.RunSynchronously

0 commit comments

Comments
 (0)