summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2023-05-16 09:35:35 +1200
committerOlly Betts <olly@survex.com>2023-05-16 09:35:35 +1200
commite5650d8fa44e64d9b4ffd70b896f757eae4a65e6 (patch)
treef22f0878ab04b2fc97b904fdbeac55dca0399227 /Source
parent8a9628e2b900a4f62b52ab339ba35f50fedd1fd8 (diff)
downloadswig-e5650d8fa44e64d9b4ffd70b896f757eae4a65e6.tar.gz
Emit extra message for missing typecheck typemap
This has been reported too many times (#2404 #2528 #2581 recently) so explain that this may break dispatch and link to the relevant documentation.
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/overload.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Modules/overload.cxx b/Source/Modules/overload.cxx
index b94e87ebb..5189c8ba4 100644
--- a/Source/Modules/overload.cxx
+++ b/Source/Modules/overload.cxx
@@ -564,6 +564,8 @@ String *Swig_overload_dispatch_cast(Node *n, const_String_or_char_ptr fmt, int *
Swig_warning(WARN_TYPEMAP_TYPECHECK_UNDEF, Getfile(ni), Getline(ni),
"Overloaded method %s with no explicit typecheck typemap for arg %d of type '%s'\n",
Swig_name_decl(n), j, SwigType_str(Getattr(pj, "type"), 0));
+ Swig_warning(WARN_TYPEMAP_TYPECHECK_UNDEF, Getfile(ni), Getline(ni),
+ "Dispatching calls to this method may not work correctly, see: https://www.swig.org/Doc4.1/Typemaps.html#Typemaps_overloading\n");
}
Parm *pj1 = Getattr(pj, "tmap:in:next");
if (pj1)
@@ -739,6 +741,8 @@ static String *overload_dispatch_fast(Node *n, const_String_or_char_ptr fmt, int
Swig_warning(WARN_TYPEMAP_TYPECHECK_UNDEF, Getfile(ni), Getline(ni),
"Overloaded method %s with no explicit typecheck typemap for arg %d of type '%s'\n",
Swig_name_decl(n), j, SwigType_str(Getattr(pj, "type"), 0));
+ Swig_warning(WARN_TYPEMAP_TYPECHECK_UNDEF, Getfile(ni), Getline(ni),
+ "Dispatching calls to this method may not work correctly, see: https://www.swig.org/Doc4.1/Typemaps.html#Typemaps_overloading\n");
}
Parm *pj1 = Getattr(pj, "tmap:in:next");
if (pj1)
@@ -836,6 +840,8 @@ String *Swig_overload_dispatch(Node *n, const_String_or_char_ptr fmt, int *maxar
Swig_warning(WARN_TYPEMAP_TYPECHECK_UNDEF, Getfile(ni), Getline(ni),
"Overloaded method %s with no explicit typecheck typemap for arg %d of type '%s'\n",
Swig_name_decl(n), j, SwigType_str(Getattr(pj, "type"), 0));
+ Swig_warning(WARN_TYPEMAP_TYPECHECK_UNDEF, Getfile(ni), Getline(ni),
+ "Dispatching calls to this method may not work correctly, see: https://www.swig.org/Doc4.1/Typemaps.html#Typemaps_overloading\n");
}
Parm *pk = Getattr(pj, "tmap:in:next");
if (pk)