Guest User

Untitled

a guest
May 25th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. class A {
  2. let hoge: C
  3. init(a: B) {
  4. a.foo()
  5. self.hoge = .init()
  6. }
  7. }
  8.  
  9. class C {}
  10.  
  11. class B: A {
  12. init() {
  13. super.init(a: self)
  14. }
  15.  
  16. func foo() {
  17. print(self.hoge)
  18. }
  19. }
  20.  
  21.  
  22. B.init().foo()
Add Comment
Please, Sign In to add comment