Array types are now written with the brackets around the element type

因为网站翻译的时候应该用的beta/beta2,而再beta4中就会出现问题,解决问题方案:

var shopping: String[] = ["Eggs","Milk"];

修改成

var shopping: [String] = ["Eggs","Milk"];

既可,解决问题!

原文地址:https://www.cnblogs.com/Yukang1989/p/3903175.html