diff options
Diffstat (limited to 'Examples')
-rw-r--r-- | Examples/test-suite/common.mk | 1 | ||||
-rw-r--r-- | Examples/test-suite/duplicate_parm_names.i | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index db2a3d6f7..ff9b8538f 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -225,6 +225,7 @@ CPP_TEST_CASES += \ director_wombat \ disown \ duplicate_class_name_in_ns \ + duplicate_parm_names \ dynamic_cast \ empty \ enum_ignore \ diff --git a/Examples/test-suite/duplicate_parm_names.i b/Examples/test-suite/duplicate_parm_names.i new file mode 100644 index 000000000..b6c369c8c --- /dev/null +++ b/Examples/test-suite/duplicate_parm_names.i @@ -0,0 +1,21 @@ +%module duplicate_parm_names + +// Testing duplicate argument name handling + +%{ +void fn_2parms(int, int) {} +void fn_3parms(int, int, double) {} +void fn_4parms(int, short, double, const char *) {} + +struct SameParmNameCheck { + void metho(int, short, double, const char *) {} +}; +%} + +void fn_2parms(int argx, int argx) {} +void fn_3parms(int p_a, int p_a, double p_c) {} +void fn_4parms(int duplicate, short duplicate, double duplicate, const char *duplicate) {} + +struct SameParmNameCheck { + void metho(int dup, short dup, double uniq, const char *dup) {} +}; |