2
我得到這個在Xcode 6.1(6A1046a),因爲我與6.0:斯威夫特字符串,字符串聯加上分配
var dog:String = "Dog"
let plural:Character = "s"
let dogs:String = dog.append(plural)
遊樂場報道:
Playground execution failed: :29:23: error: cannot invoke 'append' with an argument of type 'Character' let dogs:String = dog.append(plural)
我爲什麼不能做這一點,雖然這是罰款:
dog.append(plural)