summaryrefslogtreecommitdiff
path: root/Examples/test-suite/inherit_same_name.i
blob: e50d064add8262a23884ef1b4fe1417491fc6415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
%module inherit_same_name

%inline %{
  struct Base {
    Base() : MethodOrVariable(0) {}
    virtual ~Base() {}
  protected:
    int MethodOrVariable;
  };
  struct Derived : Base {
    virtual void MethodOrVariable() { Base::MethodOrVariable = 10; }
  };
  struct Bottom : Derived {
    void MethodOrVariable() {}
  };
%}