Created
June 30, 2015 21:24
-
-
Save oisdk/24b84865af321d1c35aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeClass { | |
var a, b: Int | |
init(a: Int, b: Int) { | |
(self.a, self.b) = (a, b) | |
} | |
} | |
struct SomeStruct { | |
var a, b: Int | |
} | |
var cla = SomeClass (a: 1, b: 1) | |
var str = SomeStruct(a: 1, b: 1) | |
var ar1 = [cla] | |
var ar2 = [str] | |
cla.b = 2 | |
str.b = 2 | |
ar1 // [{a 1, b 2}] | |
ar2 // [{a 1, b 1}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment