xcode 6 ベータ 6 を使用していますが、パラメーターのない関数に対してこの奇妙なエラーが発生します。
ここに関数があります
func allStudents ()-> [String]{
var appDel:AppDelegate = (UIApplication.sharedApplication().delegate as AppDelegate)
var context:NSManagedObjectContext = appDel.managedObjectContext!
var request = NSFetchRequest(entityName: "Student")
request.returnsObjectsAsFaults = false
//Set error to nil for now
//TODO: Give an actual error.
var result:NSArray = context.executeFetchRequest(request, error: nil)
var students:[String]!
for child in result{
var fullname:String = child.valueForKey("firstName") as String + " "
fullname += child.valueForKey("middleName") as String + " "
fullname += child.valueForKey("lastName") as String
students.append(fullname)
}
return students
}
そしてここに呼び出しがあります
var all = StudentList.allStudents()
これはバグですか、それともここで何か間違っていますか?