Skip to content

Commit 9270506

Browse files
committed
Red test for try/finally unit issue.
1 parent a54d92b commit 9270506

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/GeneratedCodeTests.fs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,12 @@ let ``typeof``() =
182182
<@
183183
typeof<DateTime>.Name
184184
@> "DateTime"
185-
]
185+
]
186+
187+
[<Fact>]
188+
let ``try-finally with a unit-returning method``() =
189+
testProvidedAssembly
190+
[
191+
(<@@ try ResizeArray<int>().Clear() finally ResizeArray<int>().Clear() @@>),
192+
(fun _ -> ()) // just checking for InvalidProgramException
193+
]

0 commit comments

Comments
 (0)