Auto merge of #5902 - nox:length, r=jdm

Blocked by https://github.com/w3c/testharness.js/pull/124.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5902)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-05-14 13:37:10 -05:00
commit 8faa9f877d
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):
"""