From e83d3d8bf8ca61033284f262bf7362e08383aecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Tue, 27 Apr 2004 17:33:26 +0000 Subject: [PATCH] Add new C test tag_no_clash_with_variable git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5892 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- .../test-suite/tag_no_clash_with_variable.i | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 SWIG/Examples/test-suite/tag_no_clash_with_variable.i diff --git a/SWIG/Examples/test-suite/tag_no_clash_with_variable.i b/SWIG/Examples/test-suite/tag_no_clash_with_variable.i new file mode 100644 index 000000000..5d6342314 --- /dev/null +++ b/SWIG/Examples/test-suite/tag_no_clash_with_variable.i @@ -0,0 +1,33 @@ +/* This is a test case for -*- C -*- mode. */ +%module tag_no_clash_with_variable + +%inline %{ + +/* error_action is only a tag, not a type... */ +enum error_action { + ERRACT_ABORT, + ERRACT_EXIT, + ERRACT_THROW +}; + +/* ... thus it does not clash with a variable of the same name. */ +enum error_action error_action; + +/* Likewise for structs: */ + +struct buffalo { + int foo; +}; + +struct buffalo buffalo; + +/* And for union */ + +union onion { + int cheese; +}; + +union onion onion; + +%} +