Skip to content

Commit d101e41

Browse files
committed
Fix analyzer warning
1 parent b380004 commit d101e41

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Fantomas.Core/CodePrinter.fs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,9 @@ let isIfThenElse (e: Expr) =
353353
| Expr.IfThenElse _ -> true
354354
| _ -> false
355355

356-
let (|IsIfThenElse|_|) (e: Expr) = if isIfThenElse e then Some e else None
356+
[<return: Struct>]
357+
let (|IsIfThenElse|_|) (e: Expr) =
358+
if isIfThenElse e then ValueSome e else ValueNone
357359

358360
/// Does this expression end with a construct whose body extends
359361
/// unboundedly to the right (lambda, if-then-else, tuple, ...)?

0 commit comments

Comments
 (0)