2
我在swift操场内有一种奇怪的行为。Println和String Concatention问题
当我输入的代码
println("test 1" + "test 2" + "test 3" + "test 4") //compiles
println("test 1" + "test 2" + "test 3" + "test 4" + "test 5") //compiles
println("test 1" + "test 2" + "test 3" + "test 4" + "test 5" + "test 6") //error!
此行的最后一行代码不能编译。错误是:
Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions
我做错了什么,或者这是某种错误?看起来println()的限制是5个字符串连接?
我打得有点用Xcode的测试版6.3。看起来像苹果公司解决了这个问题:) – nemke 2015-02-11 01:11:36
@nemke恕我直言,沙子只是转移。它可能已经修复了一些情况,但我在6.3 beta 3中有一些表达式仍然“太复杂”。我甚至有一个表达式在Xcode 6.2中运行良好,但是我必须将其分解,因为它显然“太复杂了“为6.3。 (叹。) – Rob 2015-03-17 20:59:16