Skip to content

Commit cc90116

Browse files
Only disallow removal when on same line (#16285)
1 parent 9e357ca commit cc90116

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Compiler/Service/ServiceAnalysis.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,10 @@ module UnnecessaryParentheses =
13191319
->
13201320
ValueNone
13211321

1322-
| SynExpr.Sequential(expr1 = SynExpr.Paren(expr = Is inner)), Dangling.Problematic _ -> ValueNone
1322+
| SynExpr.Sequential (expr1 = SynExpr.Paren(expr = Is inner); expr2 = expr2), Dangling.Problematic _ when
1323+
problematic inner.Range expr2.Range
1324+
->
1325+
ValueNone
13231326

13241327
| SynExpr.Paren _, SynExpr.Typed _
13251328
| SynExpr.Quote _, SynExpr.Typed _

0 commit comments

Comments
 (0)