I was trying out Swift arrays in the Playground, when I noticed this peculiar behaviour
The below code works fine.
import UIKit
var array = [1,2,3,"Booyaa"]
But, as soon as I remove the "import UIKit" line from the Playground, I get the following error
Playground execution failed: /var/folders/tx/tvyf1r314wj9371f491qx8wjbqbgsr/T/./lldb/11708/playground71.swift:2:17: error: 'Int' is not convertible to 'IntegerLiteralConvertible' var array = [1, 2, 3, "Booyaa"]
Why does this happen?