20 lines
214 B
Plaintext
20 lines
214 B
Plaintext
struct A {
|
|
int x
|
|
|
|
init(int x) {
|
|
self.x = x
|
|
}
|
|
}
|
|
|
|
struct B {
|
|
A a
|
|
|
|
init (A a) {
|
|
self.a = a
|
|
}
|
|
}
|
|
|
|
func main() -> int {
|
|
B myStruct = new B(new A(123))
|
|
return myStruct.a.x
|
|
} |