I've got the same error. The reason was here : guard let cell = cell { else return UITableViewCell } inside cellForRowAt method.
After when i changed that "let cell" to "let currentCell" everything builds fine. I guess you should check if you have similar cases. Hope it will helps