[FixCode] Don't add .dynamicType

Adding .dynamicType interacts poorly with the swift migrator by
invalidating some inits with type errors.

rdar://problem/26642062
This commit is contained in:
Ben Langmuir
2016-07-05 09:21:06 -07:00
parent d5d48f38b6
commit 3f026bea27
3 changed files with 18 additions and 0 deletions

View File

@@ -580,6 +580,10 @@ private:
Info.ID == diag::invalid_ibinspectable.ID ||
Info.ID == diag::invalid_ibaction_decl.ID)
return false;
// Adding .dynamicType interacts poorly with the swift migrator by
// invalidating some inits with type errors.
if (Info.ID == diag::init_not_instance_member.ID)
return false;
if (Kind == DiagnosticKind::Error)
return true;