mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
Changed phrasing, fixed and added a test.
This commit is contained in:
@ -328,7 +328,7 @@ static void methodNotFound(WrenVM* vm, ObjFiber* fiber, int symbol, ObjClass* cl
|
||||
{
|
||||
char message[100];
|
||||
|
||||
snprintf(message, 100, "Receiver '%s' does not implement method '%s'.",
|
||||
snprintf(message, 100, "%s does not implement method '%s'.",
|
||||
classObj->name->value,
|
||||
vm->methods.names.data[symbol]);
|
||||
|
||||
|
||||
@ -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'.
|
||||
|
||||
3
test/method/static_method_not_found.wren
Normal file
3
test/method/static_method_not_found.wren
Normal file
@ -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