最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】swift代码出错:Consecutive statements on a line must be separated by ‘;’

Swift crifan 4793浏览

代码:

calculatedCellHeight = timestampHeight + bubbleMessageHeight + MessageTableViewCellPadding

出错:

Consecutive statements on a line must be separated by ‘;’

 

Consecutive statements on a line must be separated by

 

然后代码看起来是正常的啊。

clean后再build

还是出错。

 

最后的最后,才注意到:

原来提示出错的位置的地方,是中文的加号”+",而不是英文的加号”+"

所以才无法编译,提示错误的。

 

改为英文的加号:

calculatedCellHeight = timestampHeight + bubbleMessageHeight + MessageTableViewCellPadding

即可通过编译:

seperator colon change to english version can compile

转载请注明:在路上 » 【已解决】swift代码出错:Consecutive statements on a line must be separated by ‘;’

83 queries in 0.324 seconds, using 19.07MB memory