I'm trying to extend a struct
that is already inside a struct
. When I write the following code, I get
declaration is only valid at file scope.
struct A {
struct AA {
}
}
extension A {
extension AA {
}
}
Is it invalid to write an extension inside an extension?