Python: ObjectAPI to ValueAPI: WrongNumberArgumentsInClassInstantiation: Adds preliminary modernization

This commit is contained in:
Rebecca Valentine
2020-04-09 14:58:30 -07:00
parent 9f18a15a93
commit 8dc1933a02
2 changed files with 19 additions and 19 deletions

View File

@@ -15,17 +15,17 @@
import python
import Expressions.CallArgs
from Call call, ClassObject cls, string too, string should, int limit, FunctionObject init
from Call call, ClassValue cls, string too, string should, int limit, FunctionValue init
where
(
too_many_args_objectapi(call, cls, limit) and
too_many_args(call, cls, limit) and
too = "too many arguments" and
should = "no more than "
or
too_few_args_objectapi(call, cls, limit) and
too_few_args(call, cls, limit) and
too = "too few arguments" and
should = "no fewer than "
) and
init = get_function_or_initializer_objectapi(cls)
init = get_function_or_initializer(cls)
select call, "Call to $@ with " + too + "; should be " + should + limit.toString() + ".", init,
init.getQualifiedName()