diff --git a/src/Generator/Passes/MultipleInheritancePass.cs b/src/Generator/Passes/MultipleInheritancePass.cs index c2ece93d77..240ec819f3 100644 --- a/src/Generator/Passes/MultipleInheritancePass.cs +++ b/src/Generator/Passes/MultipleInheritancePass.cs @@ -196,7 +196,8 @@ private static void ImplementInterfaceMethods(Class @class, Class @interface) foreach (var method in @interface.Methods) { if (@class.Methods.Any(m => m.OriginalName == method.OriginalName && - m.Parameters.SequenceEqual(method.Parameters, parameterTypeComparer))) + m.Parameters.SequenceEqual(method.Parameters.Where(p => !p.Ignore), + parameterTypeComparer))) continue; var impl = new Method(method) { diff --git a/tests/CSharpTemp/CSharpTemp.Tests.cs b/tests/CSharpTemp/CSharpTemp.Tests.cs index da8a0ce925..1df0d8ca6e 100644 --- a/tests/CSharpTemp/CSharpTemp.Tests.cs +++ b/tests/CSharpTemp/CSharpTemp.Tests.cs @@ -22,6 +22,14 @@ public void TestUncompilableCode() new InheritanceBuffer().Dispose(); new HasProtectedVirtual().Dispose(); new Proprietor(5).Dispose(); + using (var testOverrideFromSecondaryBase = new TestOverrideFromSecondaryBase()) + { + testOverrideFromSecondaryBase.function(); + var ok = false; + testOverrideFromSecondaryBase.function(ref ok); + var property = testOverrideFromSecondaryBase.property; + testOverrideFromSecondaryBase.VirtualMember(); + } using (var foo = new Foo()) { var isNoParams = foo.IsNoParams; diff --git a/tests/CSharpTemp/CSharpTemp.cpp b/tests/CSharpTemp/CSharpTemp.cpp index 855ece0b95..e7521c08b2 100644 --- a/tests/CSharpTemp/CSharpTemp.cpp +++ b/tests/CSharpTemp/CSharpTemp.cpp @@ -585,7 +585,7 @@ void SecondaryBase::setProperty(int value) { } -void SecondaryBase::function() +void SecondaryBase::function(bool* ok) { } @@ -602,6 +602,10 @@ void SecondaryBase::setProtectedProperty(int value) { } +TestOverrideFromSecondaryBase::TestOverrideFromSecondaryBase() +{ +} + void TestOverrideFromSecondaryBase::VirtualMember() { } diff --git a/tests/CSharpTemp/CSharpTemp.h b/tests/CSharpTemp/CSharpTemp.h index 263fb105b9..f07cf11d94 100644 --- a/tests/CSharpTemp/CSharpTemp.h +++ b/tests/CSharpTemp/CSharpTemp.h @@ -573,7 +573,7 @@ class DLL_API SecondaryBase virtual void VirtualMember(); int property(); void setProperty(int value); - void function(); + void function(bool* ok = 0); protected: void protectedFunction(); int protectedProperty(); @@ -583,6 +583,7 @@ class DLL_API SecondaryBase class DLL_API TestOverrideFromSecondaryBase : public Foo, public SecondaryBase { public: + TestOverrideFromSecondaryBase(); void VirtualMember(); void setProperty(int value); };