Store the class name string in `ObjClass` during compilation and class creation, and expose it through a new `class_name` native method. Also update `object_toString` to return the class name for class instances and "instance of <name>" for regular instances.
3 lines
79 B
Plaintext
3 lines
79 B
Plaintext
class Foo {}
|
|
IO.print((new Foo).toString == "instance of Foo") // expect: true
|