Skip to content

Instantly share code, notes, and snippets.

@el-hoshino
Created January 9, 2015 09:43
Show Gist options
  • Save el-hoshino/58f467d53787bf18c402 to your computer and use it in GitHub Desktop.
Save el-hoshino/58f467d53787bf18c402 to your computer and use it in GitHub Desktop.
配列宣言時型推論の意外な落とし穴 ref: http://qiita.com/lovee/items/7e96284f4520b48646a3
let testString = "test"
let testFlag = true
let testInt = 1
let testArray = [testString, testFlag, testInt]
let testAny = testArray[0] as Any
let testArray: [Any] = [testString, testFlag, testInt]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment