while I'm here, talking about AceOO. There has been a recent change in AceOO that makes the following example fail, which I think is a bug :
local oo = AceLibrary("AceOO-2.0")
local I = oo:Interface{foo = "string"}
local C = oo:Class(I)
function C.prototype:init()
self.foo = "bar"
C.super.prototype.init(self)
end
local o = C:new()
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
in Class:init() we have :
but in validateInterface() we have :
Ouch ! So if you have inheritance and the child class support an interface, then the parent is marked as supporting the interface !
The fix is easy, when you have understood this. Replace :
by