fork download
  1. class A {
  2. private var x: Int
  3. init(x: Int) {
  4. self.x = x
  5. }
  6. func m(other: A) {
  7. print(other.x)
  8. }
  9. }
  10.  
  11. let foo = A(x: 1)
  12. let bar = A(x: 2)
  13. foo.m(other: bar)
Success #stdin #stdout 0s 57640KB
stdin
Standard input is empty
stdout
2