diff --git a/src/embed_tests/Inheritance.cs b/src/embed_tests/Inheritance.cs index 950c08548..a992ee8e4 100644 --- a/src/embed_tests/Inheritance.cs +++ b/src/embed_tests/Inheritance.cs @@ -59,6 +59,14 @@ public void InheritedFromInheritedClassIsSelf() Assert.IsTrue(PythonReferenceComparer.Instance.Equals(b, bInstanceClass)); } + // https://github.com/pythonnet/pythonnet/issues/1420 + [Test] + public void CallBaseMethodFromContainerInNestedClass() + { + using var nested = new ContainerClass.InnerClass().ToPython(); + nested.InvokeMethod(nameof(ContainerClass.BaseMethod)); + } + [Test] public void Grandchild_PassesExtraBaseInstanceCheck() { @@ -183,4 +191,14 @@ public int XProp set => this.extras[nameof(this.XProp)] = value; } } + + public class ContainerClass + { + public void BaseMethod() { } + + public class InnerClass: ContainerClass + { + + } + } } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy