Fix length value of interface methods

This commit is contained in:
Anthony Ramine 2015-04-30 00:02:36 +02:00
parent 8979d77e77
commit d9619853e2
8 changed files with 6 additions and 195 deletions

View file

@ -1224,11 +1224,11 @@ class PropertyDefiner:
",\n".join(specs) + "\n" +
"];\n") % (name, specType))
# The length of a method is the maximum of the lengths of the
# The length of a method is the minimum of the lengths of the
# argument lists of all its overloads.
def methodLength(method):
signatures = method.signatures()
return max([len(arguments) for (retType, arguments) in signatures])
return min(len([arg for arg in arguments if not arg.optional and not arg.variadic]) for (_, arguments) in signatures)
class MethodDefiner(PropertyDefiner):
"""