daily pastebin goal
12%
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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top