0
import Foundation


var currentTime = NSDate()
println("It is currently", currentTime)

This Swift code is very simple and should work, correct? Why am i receiving an error that says "SourceKitService terminated - editor functionality currently limited" Am I doing something wrong or is it the beta's fault?

4

1 回答 1

2

您将使用 Jack Wu 在第一条评论中建议的字符串插值:

println("It is currently \(currentTime)")

println函数不接受多个参数。你也可以使用

println(currentTime)

但是,您的第一次(语法错误)尝试导致 Xcode 6 崩溃(至少对我来说是这样)当然是一个错误。您应该只报告一个问题。

于 2014-06-17T18:30:28.977 回答