Created
April 7, 2015 18:53
-
-
Save rayfix/87e8a1e2aa015647cbb2 to your computer and use it in GitHub Desktop.
didSet on array crashes my playground
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
// Playground - noun: a place where people can play | |
import UIKit | |
var str = "Hello, playground" | |
struct Thing { | |
var arr: [Int] = [] { | |
didSet { | |
println("didSet{} called") | |
} | |
} | |
} | |
var t = Thing() | |
t.arr = [3,2] | |
t.arr.append(3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment