File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ public void InheritedFromInheritedClassIsSelf()
5959 Assert . IsTrue ( PythonReferenceComparer . Instance . Equals ( b , bInstanceClass ) ) ;
6060 }
6161
62+ // https://github.com/pythonnet/pythonnet/issues/1420
63+ [ Test ]
64+ public void CallBaseMethodFromContainerInNestedClass ( )
65+ {
66+ using var nested = new ContainerClass . InnerClass ( ) . ToPython ( ) ;
67+ nested . InvokeMethod ( nameof ( ContainerClass . BaseMethod ) ) ;
68+ }
69+
6270 [ Test ]
6371 public void Grandchild_PassesExtraBaseInstanceCheck ( )
6472 {
@@ -183,4 +191,14 @@ public int XProp
183191 set => this . extras [ nameof ( this . XProp ) ] = value ;
184192 }
185193 }
194+
195+ public class ContainerClass
196+ {
197+ public void BaseMethod ( ) { }
198+
199+ public class InnerClass : ContainerClass
200+ {
201+
202+ }
203+ }
186204}
You can’t perform that action at this time.
0 commit comments