#unittest { name: "Complex nested classes example."; error: NONE; result: 667; }; class c1 { public var p1; class c2 { public var p2; class c3 { public var p3; class c4 { class c5 { public var p6; // c5 init func init() { p6 = 667; } } func p5() { return c5(); } } // c3 init func init() { p3 = [c4, c4, c4, c4]; } } // c2 init func init() { p2 = c3(); } } // c1 init func init() { p1 = c2(); } } func main() { return c1().p1.p2.p3[2]().p5().p6; }