Skip to content

Commit

Permalink
Test RedundantBraces around nested if before else
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Sep 20, 2024
1 parent e172cec commit c9ed923
Showing 1 changed file with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,43 @@ while (x < 10) {
>>>
while (x < 10)
x += 1
<<< #4133 outer braces around expression ending with `if`-without-`else`
object a {
if (imported.isOverloaded) {
for (sym <- imported.alternatives)
if (isQualifyingImplicit(name, sym, pre, imported = true))
f(sym)
}
else if (isQualifyingImplicit(name, imported, pre, imported = true))
f(imported)
}
>>>
Idempotency violated
=> Diff (- obtained, + expected)
f(sym)
- else if (isQualifyingImplicit(name, imported, pre, imported = true))
- f(imported)
+ else if (isQualifyingImplicit(name, imported, pre, imported = true))
+ f(imported)
}
<<< #4133 nested braces around expression ending with `if`-without-`else`
object a {
if (imported.isOverloaded) {
for (sym <- imported.alternatives) {
if (isQualifyingImplicit(name, sym, pre, imported = true)) {
f(sym)
}
}
}
else if (isQualifyingImplicit(name, imported, pre, imported = true))
f(imported)
}
>>>
Idempotency violated
=> Diff (- obtained, + expected)
f(sym)
- else if (isQualifyingImplicit(name, imported, pre, imported = true))
- f(imported)
+ else if (isQualifyingImplicit(name, imported, pre, imported = true))
+ f(imported)
}

0 comments on commit c9ed923

Please sign in to comment.