最新消息:20210917 已从crifan.com换到crifan.org

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

Swift crifan 3367浏览 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,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
94 queries in 0.180 seconds, using 23.30MB memory