update specs for new class super

This commit is contained in:
leaf corcoran 2015-12-06 11:24:42 -08:00
parent 7eb269b35a
commit 7aa63b2b61
2 changed files with 84 additions and 9 deletions

View File

@ -186,13 +186,28 @@ class Cool extends Thing
world: -> super.one
}
--
class Cool extends Thing
class Whack extends Thing
dang: do_something =>
super!
---
class Wowha extends Thing
@butt: ->
super!
super.hello
super\hello!
super\hello
@butt: cool {
->
super!
super.hello
super\hello!
super\hello
}
nil

View File

@ -126,7 +126,7 @@ do
local _parent_0 = Hi
local _base_0 = {
cool = function(self)
return _class_0.__parent.cool(self, 120302)
return _class_0.__parent.__base.cool(self, 120302)
end
}
_base_0.__index = _base_0
@ -193,7 +193,7 @@ do
local _parent_0 = Okay
local _base_0 = {
something = function(self)
_class_0.__parent.something(self, 1, 2, 3, 4)
_class_0.__parent.__base.something(self, 1, 2, 3, 4)
_class_0.__parent.something(another_self, 1, 2, 3, 4)
return assert(_class_0.__parent == Okay)
end
@ -336,7 +336,7 @@ do
local _class_0
local _base_0 = {
hi = function(self)
_class_0.__parent.hi(self, 1, 2, 3, 4)(1, 2, 3, 4)
_class_0.__parent.__base.hi(self, 1, 2, 3, 4)(1, 2, 3, 4)
_class_0.__parent.something(1, 2, 3, 4)
local _ = _class_0.__parent.something(1, 2, 3, 4).world
_class_0.__parent.yeah(self, "world").okay(hi, hi, hi)
@ -768,7 +768,7 @@ do
dang = function(self)
return {
hello = function()
return _class_0.__parent.dang(self)
return _class_0.__parent.__base.dang(self)
end,
world = function()
return _class_0.__parent.one
@ -814,7 +814,7 @@ do
local _parent_0 = Thing
local _base_0 = {
dang = do_something(function(self)
return _class_0.__parent.dang(self)
return _class_0.__parent.__base.dang(self)
end)
}
_base_0.__index = _base_0
@ -824,7 +824,7 @@ do
return _class_0.__parent.__init(self, ...)
end,
__base = _base_0,
__name = "Cool",
__name = "Whack",
__parent = _parent_0
}, {
__index = function(cls, name)
@ -848,6 +848,66 @@ do
if _parent_0.__inherited then
_parent_0.__inherited(_parent_0, _class_0)
end
Cool = _class_0
Whack = _class_0
end
do
local _class_0
local _parent_0 = Thing
local _base_0 = { }
_base_0.__index = _base_0
setmetatable(_base_0, _parent_0.__base)
_class_0 = setmetatable({
__init = function(self, ...)
return _class_0.__parent.__init(self, ...)
end,
__base = _base_0,
__name = "Wowha",
__parent = _parent_0
}, {
__index = function(cls, name)
local val = rawget(_base_0, name)
if val == nil then
local parent = rawget(cls, "__parent")
if parent then
return parent[name]
end
else
return val
end
end,
__call = function(cls, ...)
local _self_0 = setmetatable({}, _base_0)
cls.__init(_self_0, ...)
return _self_0
end
})
_base_0.__class = _class_0
local self = _class_0
self.butt = function()
_class_0.__parent.butt(self)
_ = _class_0.__parent.hello
_class_0.__parent.hello(self)
local _base_1 = _class_0.__parent
local _fn_0 = _base_1.hello
return function(...)
return _fn_0(self, ...)
end
end
self.butt = cool({
function()
_class_0.__parent.butt(self)
_ = _class_0.__parent.hello
_class_0.__parent.hello(self)
local _base_1 = _class_0.__parent
local _fn_0 = _base_1.hello
return function(...)
return _fn_0(self, ...)
end
end
})
if _parent_0.__inherited then
_parent_0.__inherited(_parent_0, _class_0)
end
Wowha = _class_0
end
return nil