@@ -169,33 +169,36 @@ object NameOps {
169
169
170
170
def functionArity : Int =
171
171
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
+ }
175
178
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
177
180
*/
178
181
def isFunction : Boolean = functionArity >= 0
179
182
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
181
184
*/
182
185
def isImplicitFunction : Boolean = {
183
186
functionArityFor(str.ImplicitFunction ) >= 0 ||
184
- functionArityFor(str.ErasedImplicitFunction ) >= 0
187
+ functionArityFor(str.ErasedImplicitFunction ) > 0
185
188
}
186
189
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
188
191
*/
189
192
def isErasedFunction : Boolean = {
190
- functionArityFor(str.ErasedFunction ) >= 0 ||
191
- functionArityFor(str.ErasedImplicitFunction ) >= 0
193
+ functionArityFor(str.ErasedFunction ) > 0 ||
194
+ functionArityFor(str.ErasedImplicitFunction ) > 0
192
195
}
193
196
194
197
/** Is a synthetic function name, i.e. one of
195
198
* - FunctionN for N > 22
196
199
* - ImplicitFunctionN for N >= 0
197
- * - ErasedFunctionN for N >= 0
198
- * - ErasedImplicitFunctionN for N >= 0
200
+ * - ErasedFunctionN for N > 0
201
+ * - ErasedImplicitFunctionN for N > 0
199
202
*/
200
203
def isSyntheticFunction : Boolean = {
201
204
functionArityFor(str.Function ) > MaxImplementedFunctionArity ||
0 commit comments