Let the user know the arity of a missing method in the error message.

This commit is contained in:
Gavin Schulz
2015-01-04 14:42:11 -05:00
parent c25cfca18b
commit 7f90485cff
10 changed files with 64 additions and 16 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
class Foo {}
(new Foo).someUnknownMethod // expect runtime error: Foo does not implement method 'someUnknownMethod'.
(new Foo).someUnknownMethod // expect runtime error: Foo does not implement method 'someUnknownMethod' with 0 arguments.
@@ -0,0 +1,3 @@
class Foo {}
(new Foo).someUnknownMethod(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) // expect runtime error: Foo does not implement method 'someUnknownMethod' with 11 arguments.
@@ -0,0 +1,3 @@
class Foo {}
(new Foo).someUnknownMethod(1, 2) // expect runtime error: Foo does not implement method 'someUnknownMethod' with 2 arguments.
+3
View File
@@ -0,0 +1,3 @@
class Foo {}
(new Foo).someUnknownMethod(1) // expect runtime error: Foo does not implement method 'someUnknownMethod' with 1 argument.
+1 -1
View File
@@ -1,3 +1,3 @@
class Foo {}
Foo.bar // expect runtime error: Foo metaclass does not implement method 'bar'.
Foo.bar // expect runtime error: Foo metaclass does not implement method 'bar' with 0 arguments.