Skip to content

Commit 7474ba3

Browse files
committed
Reformat code of UnusedFunctions in NameOpts
1 parent 68ea63c commit 7474ba3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

compiler/src/dotty/tools/dotc/core/NameOps.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,10 @@ object NameOps {
174174
*/
175175
def functionArity: Int =
176176
functionArityFor(str.Function) max {
177-
val n = functionArityFor(str.ImplicitFunction) max functionArityFor(str.UnusedFunction) max functionArityFor(str.UnusedImplicitFunction)
177+
val n =
178+
functionArityFor(str.ImplicitFunction) max
179+
functionArityFor(str.UnusedFunction) max
180+
functionArityFor(str.UnusedImplicitFunction)
178181
if (n == 0) -1 else n
179182
}
180183

@@ -216,9 +219,8 @@ object NameOps {
216219
*/
217220
def isSyntheticFunction: Boolean = {
218221
functionArityFor(str.Function) > MaxImplementedFunctionArity ||
219-
functionArityFor(str.ImplicitFunction) >= 1 ||
220-
functionArityFor(str.UnusedFunction) >= 1 ||
221-
functionArityFor(str.UnusedImplicitFunction) >= 1
222+
functionArityFor(str.ImplicitFunction) >= 1 ||
223+
isUnusedFunction
222224
}
223225

224226
/** Parsed function arity for function with some specific prefix */

0 commit comments

Comments
 (0)