Swift编译器与operator + =不一致

时间:2014-06-26 17:36:06

标签: swift

编译器似乎与其+ =的编译不一致。知道为什么最后一行有问题吗?

var num = 2;
num += 2 //Works
num+=2 // Works
num +=2 //Error: Consecutive statements on a line must be separated by ;

0 个答案:

没有答案