@@ -169,33 +169,36 @@ object NameOps {
169169
170170 def functionArity : Int =
171171 functionArityFor(str.Function ) max
172- functionArityFor(str.ImplicitFunction ) max
173- functionArityFor(str.ErasedFunction ) max
174- functionArityFor(str.ErasedImplicitFunction )
172+ functionArityFor(str.ImplicitFunction ) max {
173+ val n =
174+ functionArityFor(str.ErasedFunction ) max
175+ functionArityFor(str.ErasedImplicitFunction )
176+ if (n == 0 ) - 1 else n
177+ }
175178
176- /** Is a function name, i.e one of FunctionN, ImplicitFunctionN, ErasedFunctionN, ErasedImplicitFunctionN for N >= 0
179+ /** Is a function name, i.e one of FunctionN, ImplicitFunctionN for N >= 0 or ErasedFunctionN, ErasedImplicitFunctionN for N > 0
177180 */
178181 def isFunction : Boolean = functionArity >= 0
179182
180- /** Is an implicit function name, i.e one of ImplicitFunctionN, ErasedImplicitFunctionN for N >= 0
183+ /** Is an implicit function name, i.e one of ImplicitFunctionN for N >= 0 or ErasedImplicitFunctionN for N > 0
181184 */
182185 def isImplicitFunction : Boolean = {
183186 functionArityFor(str.ImplicitFunction ) >= 0 ||
184- functionArityFor(str.ErasedImplicitFunction ) >= 0
187+ functionArityFor(str.ErasedImplicitFunction ) > 0
185188 }
186189
187- /** Is an erased function name, i.e. one of ErasedFunctionN, ErasedImplicitFunctionN for N >= 0
190+ /** Is an erased function name, i.e. one of ErasedFunctionN, ErasedImplicitFunctionN for N > 0
188191 */
189192 def isErasedFunction : Boolean = {
190- functionArityFor(str.ErasedFunction ) >= 0 ||
191- functionArityFor(str.ErasedImplicitFunction ) >= 0
193+ functionArityFor(str.ErasedFunction ) > 0 ||
194+ functionArityFor(str.ErasedImplicitFunction ) > 0
192195 }
193196
194197 /** Is a synthetic function name, i.e. one of
195198 * - FunctionN for N > 22
196199 * - ImplicitFunctionN for N >= 0
197- * - ErasedFunctionN for N >= 0
198- * - ErasedImplicitFunctionN for N >= 0
200+ * - ErasedFunctionN for N > 0
201+ * - ErasedImplicitFunctionN for N > 0
199202 */
200203 def isSyntheticFunction : Boolean = {
201204 functionArityFor(str.Function ) > MaxImplementedFunctionArity ||
0 commit comments