Swift错误"容器文字中的预期表达式"变量声明

时间:2018-06-06 18:10:15

标签: swift

消息"容器文字中的预期表达式"继续出现在变量行中。代码如下:

import ResearchKit

public var ConsentDocument: ORKConsentDocument {

let consentDocument = ORKConsentDocument()
consentDocument.title = "Example Consent"

let _: [ORKConsentSectionType] = [
var consentSection: [ORKConsentSection] = consentSectionTypes.map { contentSectionType in
let consentSection = ORKConsentSection(type: contentSectionType)
consentSection.summary = "x."
consentSection.content = "y."
return consentSection
}

很抱歉这个混乱。

0 个答案:

没有答案