Commits

John McCall committed b75f5f24507
Type-check catch patterns in closures as necessary in order to decide whether they're exhaustive. Unfortunately, we can't actually just type-check the pattern because it might be dependent on other local type-checking state, like the types of arguments or variables defined within the closure. So instead we try to recognize a very specific pattern shape that should be safe to coerce. Also, this potentially introduces redundant diagnostics because of the double-check, but it's tricky to do anything about it. I think it's better to have these potential redundancies than to infer a throwing closure type with 'catch let e as NSError', though. rdar://21715350 Swift SVN r30701