Changed phrasing, fixed and added a test.
This commit is contained in:
+1
-1
@@ -328,7 +328,7 @@ static void methodNotFound(WrenVM* vm, ObjFiber* fiber, int symbol, ObjClass* cl
|
|||||||
{
|
{
|
||||||
char message[100];
|
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,
|
classObj->name->value,
|
||||||
vm->methods.names.data[symbol]);
|
vm->methods.names.data[symbol]);
|
||||||
|
|
||||||
|
|||||||
@@ -4,4 +4,4 @@ class Foo {
|
|||||||
|
|
||||||
class Bar is 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 {}
|
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