PageRenderTime 13ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/derived_nested.i

#
Swig | 27 lines | 19 code | 6 blank | 2 comment | 0 complexity | e5fb04a2109a2ed82874bb29836cd8cd MD5 | raw file
 1/* This testcase tests nested derived classes.
 2This was reported in bug #909389 */
 3
 4%module derived_nested
 5
 6%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::CC;
 7%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::DD;
 8%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::EE;
 9%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::FF;
10
11%inline %{
12
13class A { int x; };
14class B {
15  class C { int y; }; //generates a warning
16  class D : public A { int z; }; //ok
17};
18
19struct BB {
20  class CC { int y; };
21  class DD : public A { int z; };
22  struct EE : public A { int z; };
23  struct FF : public A { int z; } ff_instance; // Bug 1960977
24  void useEE(const EE& e) {}
25};
26%}
27