Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Playground - noun: a place where people can play
- import Foundation
- /*
- If this class inherits from NSObject, then
- println(weekSelections[0]) prints "false" below.
- If it doesn't inherit from NSObject, it prints "true".
- */
- class Foo : NSObject {
- var weekSelections: Array<Bool>!
- func test() {
- weekSelections = Array<Bool>(count: 10, repeatedValue: false)
- weekSelections[0] = true;
- println(weekSelections[0]) // Prints "false"
- }
- }
- var foo = Foo()
- foo.test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement