Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Mar 16, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 22 Oct 2011 at 7:32

@GoogleCodeExporter
Copy link
Author

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

Original comment by [email protected] on 28 Aug 2012 at 7:14

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

I think this is an old bug report of mine, which is safe to close Jose.

Original comment by [email protected] on 11 Oct 2014 at 7:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant