{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/2634","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/2634/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/2634/comments","events_url":"https://api.github.com/repos/apple/swift/issues/2634/events","html_url":"https://github.com/apple/swift/pull/2634","id":156095413,"number":2634,"title":"SE-0036: Requiring Leading Dot Prefixes for Enum Instance Member Implementations (once again)","user":{"login":"ahoppen","id":4062178,"avatar_url":"https://avatars.githubusercontent.com/u/4062178?v=3","gravatar_id":"","url":"https://api.github.com/users/ahoppen","html_url":"https://github.com/ahoppen","followers_url":"https://api.github.com/users/ahoppen/followers","following_url":"https://api.github.com/users/ahoppen/following{/other_user}","gists_url":"https://api.github.com/users/ahoppen/gists{/gist_id}","starred_url":"https://api.github.com/users/ahoppen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahoppen/subscriptions","organizations_url":"https://api.github.com/users/ahoppen/orgs","repos_url":"https://api.github.com/users/ahoppen/repos","events_url":"https://api.github.com/users/ahoppen/events{/privacy}","received_events_url":"https://api.github.com/users/ahoppen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-21T10:37:50Z","updated_at":"2016-06-02T15:14:15Z","closed_at":"2016-06-02T15:14:15Z","pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/2634","html_url":"https://github.com/apple/swift/pull/2634","diff_url":"https://github.com/apple/swift/pull/2634.diff","patch_url":"https://github.com/apple/swift/pull/2634.patch"},"body":"<!-- Please complete this template before creating pull request. -->\r\n#### What's in this pull request?\r\nThis is a follow up to #2224, which has been merged and reversed, implementing [SE-0036](https://github.com/apple/swift-evolution/blob/master/proposals/0036-enum-dot.md): Requiring Leading Dot Prefixes for Enum Instance Member Implementations\r\n\r\nI added the following fix-its to the original PR:\r\n- Fix-it using `.` where the type can be inferred using the constraint system’s contextual type, e.g. `self = A` to `self = .A`\r\n- Fix-it using `.` in case statements of non-generic enum elements\r\n- Fix-it using the fully specified type without generic parameters everywhere else. Generic parameters could be inferred in all examples I could think of.\r\n\r\nThe generation of the fix-it for `case` statements is, for my taste, quite ugly as it directly references the `~=` pattern matching operator and its arguments. But it was the best solution I could think of without rerunning the constraint system on a modified copy of the AST, where a `.` has been added as a guess.\r\n\r\nThus, I would suggest removing the fix-it once the transition to Swift 3 has been finished, for example in the Swift 4 timeframe. I guess it provides little benefit apart from automated transitioning anyway.\r\n\r\n#### Resolved bug number: ([SR-1236](https://bugs.swift.org/browse/SR-1236))\r\n<!-- If this pull request resolves any bugs from Swift bug tracker -->\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/223323241","html_url":"https://github.com/apple/swift/pull/2634#issuecomment-223323241","issue_url":"https://api.github.com/repos/apple/swift/issues/2634","id":223323241,"user":{"login":"ahoppen","id":4062178,"avatar_url":"https://avatars.githubusercontent.com/u/4062178?v=3","gravatar_id":"","url":"https://api.github.com/users/ahoppen","html_url":"https://github.com/ahoppen","followers_url":"https://api.github.com/users/ahoppen/followers","following_url":"https://api.github.com/users/ahoppen/following{/other_user}","gists_url":"https://api.github.com/users/ahoppen/gists{/gist_id}","starred_url":"https://api.github.com/users/ahoppen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahoppen/subscriptions","organizations_url":"https://api.github.com/users/ahoppen/orgs","repos_url":"https://api.github.com/users/ahoppen/repos","events_url":"https://api.github.com/users/ahoppen/events{/privacy}","received_events_url":"https://api.github.com/users/ahoppen/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T15:14:15Z","updated_at":"2016-06-02T15:14:15Z","body":"I created three PRs, each referencing a further state in the deployment of SE-0036:\r\n- #2841 updates the existing tests to comply with the new syntax (and is fully backwards compatible)\r\n- #2842 adds warnings when looking up enum elements on instances (using a completely different logic than has been implemented for this PR)\r\n- #2843 removes the warnings and adds the code that was already present in this PR, resulting in the same state"}}
{"actor":{"display_login":"ahoppen"}}