diff --git a/Examples/test-suite/li_attribute.i b/Examples/test-suite/li_attribute.i index ee3520013..c5b0eed43 100644 --- a/Examples/test-suite/li_attribute.i +++ b/Examples/test-suite/li_attribute.i @@ -11,6 +11,8 @@ %attribute(A, int, c, get_c); /* read-only */ %attribute_ref(A, int, b, d); /* different attribute name 'd' */ +%attribute_ref(B, A*, a) + %inline { struct A @@ -63,7 +65,20 @@ } private: C _v; - }; + }; + + + struct B { + B(A *a) : mA(a) + { + } + + A*& a() { return mA; } + + protected: + A* mA; + }; + } %template(Param_i) Param; diff --git a/Examples/test-suite/python/li_attribute_runme.py b/Examples/test-suite/python/li_attribute_runme.py index cce50af03..d8eff66ba 100644 --- a/Examples/test-suite/python/li_attribute_runme.py +++ b/Examples/test-suite/python/li_attribute_runme.py @@ -35,3 +35,12 @@ if pi.value != 7: pi.value=3 if pi.value != 3: raise RuntimeError + + +b = li_attribute.B(aa) + +if b.a.c != 3: + raise RuntimeError + + +