Make classes know their name.

This commit is contained in:
Bob Nystrom
2014-01-28 15:31:11 -08:00
parent 9739bc7b30
commit 5c2cf641ae
9 changed files with 182 additions and 83 deletions
+9
View File
@@ -0,0 +1,9 @@
class Foo {}
IO.print(Foo.name) // expect: Foo
IO.print(Foo.type.name) // expect: Foo metaclass
// Make sure the built-in classes have proper names too.
IO.print(Object.name) // expect: Object
IO.print(Class.name) // expect: Class
IO.print(Bool.name) // expect: Bool