Created
August 1, 2014 07:44
-
-
Save gothick/4f08e7ecfe35a5e54cdb 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
protocol Testable{} | |
class MyObj : Testable{} | |
class Test { | |
var arr:[Testable] = [] | |
func run() { | |
arr = [MyObj()] as [MyObj] | |
println("arr has \(arr.count) elements") | |
for e in arr { // following access causes EXC_BAD_ACCESS | |
println(e) | |
} | |
} | |
} | |
let t = Test() | |
t.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment