daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Apr 23rd, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class A {
  2.     var p = "abc"
  3. }
  4. var origin: A = A()
  5. let keep = origin
  6. origin.p = "123"
  7. print(origin.p)  // 123
  8. print(keep.p)    // 123(こっちも処理が反映されてしまった!!)
RAW Paste Data
Top