aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/object.nom2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/object.nom b/lib/object.nom
index 65da2a1..25ff644 100644
--- a/lib/object.nom
+++ b/lib/object.nom
@@ -80,9 +80,9 @@ compile [object %classname extends %parent %class_body] to:
Lua "\
..do
local class = {name=\(quote %classname.stub)}
+ class.__type = class.name
setmetatable(class, {
__index=\(%parent as lua expr),
- __type=class.name,
__tostring=function(cls) return cls.name end,
__call=function(cls, inst)
inst = setmetatable(inst or {}, cls)