Structs can\'t have recursive value types in Swift. So the follow code can\'t compile in Swift
struct A { let child: A }
A value type c
Since child[] can be empty there is no reason why this shouldn't work. This compiles just fine:
struct Foo { let child: [Foo] } let foo = Foo(child: [Foo(child:[Foo(child:[]), Foo(child:[])])])
Although I don't see any practical use for it – I wonder if there is, though.