aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/name_warnings.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/name_warnings.i')
-rw-r--r--Examples/test-suite/name_warnings.i17
1 files changed, 17 insertions, 0 deletions
diff --git a/Examples/test-suite/name_warnings.i b/Examples/test-suite/name_warnings.i
index 0b62ec5d7..12e46ac9d 100644
--- a/Examples/test-suite/name_warnings.i
+++ b/Examples/test-suite/name_warnings.i
@@ -69,3 +69,20 @@ namespace std
#endif
double bar(double native, bool boolean) { return 1.0; }
}
+
+// Test that anonymous template instantiations are ignored from
+// %rename/%namewarn
+%namewarn(%warningmsg(SWIGWARN_LANG_IDENTIFIER, "incorrectly warning about non-wrapped instantiated template"), error=1) "__dummy_0__";
+%inline %{
+template<typename T> struct Foo {
+ typedef T value_type;
+};
+%}
+%template() Foo<int>;
+
+// But they should still generate the correct typemaps etc
+%inline %{
+int double_an_int(Foo<int>::value_type v) {
+ return v * 2;
+}
+%}