Commits

Jordan Rose committed 7bfdd4a20b2
Provide fix-its when overriding a bridged type with the old type. This is support for SE-0069: Mutability and Foundation Value Types. In cases where someone has overridden a method that takes, e.g. 'NSURL', the override will no longer be valid, because the system class will now use the value type 'URL' instead. If an override's full name matches exactly, the compiler will offer fix-its for any uses of reference types where value types are now preferred. (This must be a direct match; subclasses, including the mutable variants of many Foundation types, will need to be updated by hand.) One wrinkle here is the use of generics. In Swift 2, Objective-C generics weren't imported at all, so it's unlikely that the overriding method will have the correct generic arguments. Simple migration might insert the "bound" type, but it can't know what specific type might be more appropriate. Therefore, the logic to add the fix-it ignores generic arguments, assuming the parent's type is correct. rdar://problem/26183575