{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/16811","repository_url":"https://api.github.com/repos/apple/swift","labels_url":"https://api.github.com/repos/apple/swift/issues/16811/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/16811/comments","events_url":"https://api.github.com/repos/apple/swift/issues/16811/events","html_url":"https://github.com/apple/swift/pull/16811","id":325929217,"number":16811,"title":"[CodeCompletion] Duplicate existential requirements when restated","user":{"login":"AnthonyLatsis","id":17835512,"avatar_url":"https://avatars3.githubusercontent.com/u/17835512?v=4","gravatar_id":"","url":"https://api.github.com/users/AnthonyLatsis","html_url":"https://github.com/AnthonyLatsis","followers_url":"https://api.github.com/users/AnthonyLatsis/followers","following_url":"https://api.github.com/users/AnthonyLatsis/following{/other_user}","gists_url":"https://api.github.com/users/AnthonyLatsis/gists{/gist_id}","starred_url":"https://api.github.com/users/AnthonyLatsis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnthonyLatsis/subscriptions","organizations_url":"https://api.github.com/users/AnthonyLatsis/orgs","repos_url":"https://api.github.com/users/AnthonyLatsis/repos","events_url":"https://api.github.com/users/AnthonyLatsis/events{/privacy}","received_events_url":"https://api.github.com/users/AnthonyLatsis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-05-24T01:10:15Z","updated_at":"2018-05-29T17:26:05Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/16811","html_url":"https://github.com/apple/swift/pull/16811","diff_url":"https://github.com/apple/swift/pull/16811.diff","patch_url":"https://github.com/apple/swift/pull/16811.patch"},"body":"Resolves [SR-7035](https://bugs.swift.org/browse/SR-7035).\r\n\r\nAlso resolves duplicates in cases like\r\n```swift\r\nfunc foo<T: A & B>(...) -> T.#^PARAM^#\r\n\r\nclass Foo : A, B {\r\n  #^MEMBER^#\r\n}\r\n```\r\n\r\nPlease look into how I tell apart restated requirements. If there is a better way (ideally wipe out any `self` occurences from a type, which isn't trivial as far as I see), I'll be glad to hear.\r\n\r\nI would like to know if it's more efficient and better to do \r\n```swift\r\nif (decl.getKind() >= DeclKind::AbstractFuncDecl_First &&\r\n    decl.getKind() <= DeclKind::AbstractFuncDecl_Last)\r\n```\r\nthan `isa<AbstractFunctionDecl>(decl)`.\r\n\r\n**P.S.** There is something strange going on with the `SemanticContextKind` on the tests. Have a look, it can be `Super` or `CurrNominal` depending on whether the function argument is or isn't of an archetype type. This was already present, the tests simply checked for one of them among the duplicates."},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/392865260","html_url":"https://github.com/apple/swift/pull/16811#issuecomment-392865260","issue_url":"https://api.github.com/repos/apple/swift/issues/16811","id":392865260,"user":{"login":"AnthonyLatsis","id":17835512,"avatar_url":"https://avatars3.githubusercontent.com/u/17835512?v=4","gravatar_id":"","url":"https://api.github.com/users/AnthonyLatsis","html_url":"https://github.com/AnthonyLatsis","followers_url":"https://api.github.com/users/AnthonyLatsis/followers","following_url":"https://api.github.com/users/AnthonyLatsis/following{/other_user}","gists_url":"https://api.github.com/users/AnthonyLatsis/gists{/gist_id}","starred_url":"https://api.github.com/users/AnthonyLatsis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnthonyLatsis/subscriptions","organizations_url":"https://api.github.com/users/AnthonyLatsis/orgs","repos_url":"https://api.github.com/users/AnthonyLatsis/repos","events_url":"https://api.github.com/users/AnthonyLatsis/events{/privacy}","received_events_url":"https://api.github.com/users/AnthonyLatsis/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T17:26:05Z","updated_at":"2018-05-29T17:26:05Z","author_association":"CONTRIBUTOR","body":"@slavapestov have a couple of minutes?"}}
{"actor":{"display_login":"AnthonyLatsis"}}