diff --git a/Examples/test-suite/errors/cpp_using_declaration_overload.i b/Examples/test-suite/errors/cpp_using_declaration_overload.i new file mode 100644 index 000000000..9ec633f3f --- /dev/null +++ b/Examples/test-suite/errors/cpp_using_declaration_overload.i @@ -0,0 +1,9 @@ +%module xxx + +struct Base { + void m(bool) {} +}; +struct Derived : Base { + void m(bool) const {} + using Base::m; +}; diff --git a/Examples/test-suite/errors/cpp_using_declaration_overload.stderr b/Examples/test-suite/errors/cpp_using_declaration_overload.stderr new file mode 100644 index 000000000..a6d4ea6d8 --- /dev/null +++ b/Examples/test-suite/errors/cpp_using_declaration_overload.stderr @@ -0,0 +1,2 @@ +cpp_using_declaration_overload.i:7: Warning 512: Overloaded method Derived::m(bool) const ignored, +cpp_using_declaration_overload.i:8: Warning 512: using non-const method m(bool) instead. diff --git a/Source/Modules/typepass.cxx b/Source/Modules/typepass.cxx index 086e7c3bf..d1a16b53a 100644 --- a/Source/Modules/typepass.cxx +++ b/Source/Modules/typepass.cxx @@ -1074,6 +1074,8 @@ class TypePass:private Dispatcher { } } Node *nn = copyNode(c); + Setfile(nn, Getfile(n)); + Setline(nn, Getline(n)); Delattr(nn, "access"); // access might be different from the method in the base class Setattr(nn, "access", Getattr(n, "access")); if (!Getattr(nn, "sym:name"))