diff options
-rw-r--r-- | Examples/test-suite/overload_return_type.i | 11 | ||||
-rw-r--r-- | Examples/test-suite/php/overload_return_type_runme.php | 10 |
2 files changed, 12 insertions, 9 deletions
diff --git a/Examples/test-suite/overload_return_type.i b/Examples/test-suite/overload_return_type.i index 1e324c3e1..e6b3b130a 100644 --- a/Examples/test-suite/overload_return_type.i +++ b/Examples/test-suite/overload_return_type.i @@ -4,17 +4,10 @@ %inline %{ -#include <string> -using namespace std; class A { }; class B { public: - int foo(int x); - A foo(string y); + int foo(int x) { return 0; } + A foo(const char * y) { return A(); } }; %} - -%{ -int B::foo(int x) { return 0; } -A B::foo(string y) { return A(); } -%} diff --git a/Examples/test-suite/php/overload_return_type_runme.php b/Examples/test-suite/php/overload_return_type_runme.php new file mode 100644 index 000000000..84979e6a1 --- /dev/null +++ b/Examples/test-suite/php/overload_return_type_runme.php @@ -0,0 +1,10 @@ +<?php + +require "tests.php"; +require "overload_return_type.php"; + +$b = new B; +check::equal($b->foo(1), 0, ""); +check::classname("A", $b->foo("test")); + +?> |