fix: remove redundant "Receiver" prefix from method-not-found error message
The error message for unimplemented methods previously included the word "Receiver" before the class name, which was redundant and inconsistent with other error messages. Updated the format string in `methodNotFound()` to drop "Receiver" and use the class name directly. Added a new test case for static method not found errors and updated existing test expectations to match the new message format.
This commit is contained in:
@@ -4,4 +4,4 @@ class Foo {
|
||||
|
||||
class Bar is Foo {}
|
||||
|
||||
Bar.methodOnFoo // expect runtime error: Receiver does not implement method 'methodOnFoo'.
|
||||
Bar.methodOnFoo // expect runtime error: Bar metaclass does not implement method 'methodOnFoo'.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
class Foo {}
|
||||
|
||||
(new Foo).someUnknownMethod // expect runtime error: Receiver does not implement method 'someUnknownMethod'.
|
||||
(new Foo).someUnknownMethod // expect runtime error: Foo does not implement method 'someUnknownMethod'.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
class Foo {}
|
||||
|
||||
Foo.bar // expect runtime error: Foo metaclass does not implement method 'bar'.
|
||||
Reference in New Issue
Block a user