pplux / slb

Automatically exported from code.google.com/p/slb
2 stars 2 forks source link

call base class's functions from a 3rd level derived class does not resolve #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
if I expose the hierarchy below, foo function fails to resolve when called from 
a C object.

=======================

Lua :

b = B()  
c = C()  

print(b:foo())  -- works
print(c:foo())  -- doesn't work

=======================

c++:

struct A
{
 const char* foo() const { return "foo"; }
};

struct B : public A
{
};

struct C: public B
{
};

SLB::Class<A>("A")
.constructor()
.set("foo", &A::foo);

SLB::Class<B>("B")
.inherits<A>()
.constructor();

SLB::Class<C>("C")
.inherits<B>()
.constructor();

Original issue reported on code.google.com by dma...@gmail.com on 22 Oct 2011 at 7:32

GoogleCodeExporter commented 9 years ago
Give it a try with newer versions, I'm pretty sure this was solved some time 
ago.

Original comment by joseLuis...@gmail.com on 28 Aug 2012 at 7:14

GoogleCodeExporter commented 9 years ago
I think this is an old bug report of mine, which is safe to close Jose.

Original comment by dmai...@gmail.com on 11 Oct 2014 at 7:34