File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -3605,3 +3605,27 @@ let ``Test ProjectForWitnesses4 GetWitnessPassingInfo`` useTransparentCompiler =
36053605 printfn "actual:\n\n%A" actual
36063606 actual
36073607 |> shouldPairwiseEqual expected
3608+
3609+ module internal ProjectForNoWarnHashDirective =
3610+
3611+ let fileSource1 = """
3612+ module N.M
3613+ #nowarn "40"
3614+ let rec f = new System.EventHandler(fun _ _ -> f.Invoke(null,null))
3615+ """
3616+
3617+ let createOptions() = createOptionsAux [fileSource1] []
3618+
3619+ [<TestCase(false)>]
3620+ [<TestCase(true)>]
3621+ [<Test>]
3622+ let ``Test NoWarn HashDirective`` useTransparentCompiler =
3623+ let cleanup, options = ProjectForNoWarnHashDirective.createOptions()
3624+ use _holder = cleanup
3625+ let exprChecker = FSharpChecker.Create(keepAssemblyContents=true, useTransparentCompiler=useTransparentCompiler)
3626+ let wholeProjectResults = exprChecker.ParseAndCheckProject(options) |> Async.RunImmediate
3627+
3628+ for e in wholeProjectResults.Diagnostics do
3629+ printfn "ProjectForNoWarnHashDirective error: <<<%s>>>" e.Message
3630+
3631+ wholeProjectResults.Diagnostics.Length |> shouldEqual 0
You can’t perform that action at this time.
0 commit comments