{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/2479","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/2479/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/2479/comments","events_url":"https://api.github.com/repos/apple/swift/issues/2479/events","html_url":"https://github.com/apple/swift/pull/2479","id":154309359,"number":2479,"title":"Provide fix-its when overriding a bridged value type with the old reference type","user":{"login":"jrose-apple","id":15097531,"avatar_url":"https://avatars.githubusercontent.com/u/15097531?v=3","gravatar_id":"","url":"https://api.github.com/users/jrose-apple","html_url":"https://github.com/jrose-apple","followers_url":"https://api.github.com/users/jrose-apple/followers","following_url":"https://api.github.com/users/jrose-apple/following{/other_user}","gists_url":"https://api.github.com/users/jrose-apple/gists{/gist_id}","starred_url":"https://api.github.com/users/jrose-apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrose-apple/subscriptions","organizations_url":"https://api.github.com/users/jrose-apple/orgs","repos_url":"https://api.github.com/users/jrose-apple/repos","events_url":"https://api.github.com/users/jrose-apple/events{/privacy}","received_events_url":"https://api.github.com/users/jrose-apple/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-05-11T18:21:51Z","updated_at":"2016-05-19T18:45:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/2479","html_url":"https://github.com/apple/swift/pull/2479","diff_url":"https://github.com/apple/swift/pull/2479.diff","patch_url":"https://github.com/apple/swift/pull/2479.patch"},"body":"This is support for [SE-0069: Mutability and Foundation Value Types](https://github.com/apple/swift-evolution/blob/master/proposals/0069-swift-mutability-for-foundation.md). In cases where someone has overridden a method that takes, e.g. `NSURL`, the override will no longer be valid, because the system\r\nclass 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.)\r\n \r\nOne 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.\r\n\r\nrdar://problem/26183575\r\n\r\n* * * *\r\n\r\n<!-- This selection should only be completed by Swift admin -->\r\nBefore merging this pull request to apple/swift repository:\r\n- [ ] Test pull request on Swift continuous integration.\r\n\r\n<details>\r\n  <summary>Triggering Swift CI</summary>\r\n\r\nThe swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:\r\n\r\n**Smoke Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please smoke test\r\n        OS X platform               | @swift-ci Please smoke test OS X platform\r\n        Linux platform              | @swift-ci Please smoke test Linux platform\r\n\r\n **Validation Testing**\r\n\r\n        Platform     | Comment\r\n        ------------ | -------------\r\n        All supported platforms     | @swift-ci Please test\r\n        OS X platform               | @swift-ci Please test OS X platform\r\n        Linux platform              | @swift-ci Please test Linux platform\r\n\r\nNote: Only members of the Apple organization can trigger swift-ci.\r\n</details>\r\n<!-- Thank you for your contribution to Swift! -->"},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/220416834","html_url":"https://github.com/apple/swift/pull/2479#issuecomment-220416834","issue_url":"https://api.github.com/repos/apple/swift/issues/2479","id":220416834,"user":{"login":"jrose-apple","id":15097531,"avatar_url":"https://avatars.githubusercontent.com/u/15097531?v=3","gravatar_id":"","url":"https://api.github.com/users/jrose-apple","html_url":"https://github.com/jrose-apple","followers_url":"https://api.github.com/users/jrose-apple/followers","following_url":"https://api.github.com/users/jrose-apple/following{/other_user}","gists_url":"https://api.github.com/users/jrose-apple/gists{/gist_id}","starred_url":"https://api.github.com/users/jrose-apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrose-apple/subscriptions","organizations_url":"https://api.github.com/users/jrose-apple/orgs","repos_url":"https://api.github.com/users/jrose-apple/repos","events_url":"https://api.github.com/users/jrose-apple/events{/privacy}","received_events_url":"https://api.github.com/users/jrose-apple/received_events","type":"User","site_admin":false},"created_at":"2016-05-19T18:45:50Z","updated_at":"2016-05-19T18:45:50Z","body":"(I appreciate these suggestions a lot!)"}}