# nested struct in class or struct struct EnclStruct class Nested def geti as int return 1 struct SNested def geti as int return 10 def geti as int return 99 class Enclosing struct NestedStruct def geti as int return 1 def geti as int return 99 def main # class with nested struct e = Enclosing() assert e.geti == 99 ens = Enclosing.NestedStruct() assert ens.geti == 1 # Struct with nested class es = EnclStruct() assert es.geti == 99 esn = EnclStruct.Nested() assert esn.geti == 1 ess = EnclStruct.SNested() assert ess.geti == 10