blob: 60da4a132936a9ffe9a693e1a1c49034c6c92857 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
%module(directors="1") director_redefined
/*
This example generates two 'get_val' virtual members in the
director, and since they are equivalent, the compilation fails.
*/
%feature("director") B;
%inline
{
typedef int Int;
struct A
{
virtual ~A()
{
}
virtual int get_val(Int a)
{
return 0;
}
virtual int get_rval(const Int& a)
{
return 0;
}
};
struct B : A
{
int get_val(int a)
{
return 1;
}
int get_rval(const int& a)
{
return 1;
}
const int& get_rrval(const int& a)
{
return a;
}
};
}
|