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

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

Swift crifan 4435浏览 0评论

代码:

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 ‘;’

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
84 queries in 0.160 seconds, using 22.07MB memory