summaryrefslogtreecommitdiff
path: root/Examples/test-suite/overload_return_type.i
blob: aa387a10828b112fa1a7102d1b5398d862345ffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
%module overload_return_type

// Regression test for PHP from SF#3168531 (SWIG <= 2.0.1 segfaults).

%inline %{

class A { };
class B {
    public:
        int foo(int x) { return 0; }
        A foo(const char * y) { return A(); }
};

// Regression test for PHP from SF#3208299 (there bar()'s return type wa
// treated as always void).

void foo(int i) {}
int foo() { return 1; }

int bar() { return 1; }
void bar(int i) {}

%}