{"action":"created","comment":{"url":"https://api.github.com/repos/dlang/dmd/pulls/comments/176855380","pull_request_review_id":106639024,"id":176855380,"diff_hunk":"@@ -3497,6 +3498,28 @@ final class Parser(AST) : Lexer\n             t = parseVector();\n             break;\n \n+        case TOK.traits:\n+        {\n+            AST.TraitsExp te = cast(AST.TraitsExp) parsePrimaryExp();\n+            if (!te)\n+            {\n+                // error already emitted while parsing primary\n+                t = new AST.TypeError;\n+            }\n+            else if (strcmp(te.ident.toChars, \"getMember\") != 0)","path":"src/dmd/parse.d","position":20,"original_position":20,"commit_id":"620b9d289612ce673764ce31693078cd2e43600d","original_commit_id":"620b9d289612ce673764ce31693078cd2e43600d","user":{"login":"wilzbach","id":4370550,"avatar_url":"https://avatars3.githubusercontent.com/u/4370550?v=4","gravatar_id":"","url":"https://api.github.com/users/wilzbach","html_url":"https://github.com/wilzbach","followers_url":"https://api.github.com/users/wilzbach/followers","following_url":"https://api.github.com/users/wilzbach/following{/other_user}","gists_url":"https://api.github.com/users/wilzbach/gists{/gist_id}","starred_url":"https://api.github.com/users/wilzbach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilzbach/subscriptions","organizations_url":"https://api.github.com/users/wilzbach/orgs","repos_url":"https://api.github.com/users/wilzbach/repos","events_url":"https://api.github.com/users/wilzbach/events{/privacy}","received_events_url":"https://api.github.com/users/wilzbach/received_events","type":"User","site_admin":false},"body":"Would be good to approve https://github.com/dlang/dmd/pull/7893 then, s.t. we can start using DStrings everywhere.","created_at":"2018-03-23T20:30:11Z","updated_at":"2018-03-23T20:30:11Z","html_url":"https://github.com/dlang/dmd/pull/8031#discussion_r176855380","pull_request_url":"https://api.github.com/repos/dlang/dmd/pulls/8031","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dlang/dmd/pulls/comments/176855380"},"html":{"href":"https://github.com/dlang/dmd/pull/8031#discussion_r176855380"},"pull_request":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8031"}},"in_reply_to_id":176854765},"pull_request":{"url":"https://api.github.com/repos/dlang/dmd/pulls/8031","id":174935030,"html_url":"https://github.com/dlang/dmd/pull/8031","diff_url":"https://github.com/dlang/dmd/pull/8031.diff","patch_url":"https://github.com/dlang/dmd/pull/8031.patch","issue_url":"https://api.github.com/repos/dlang/dmd/issues/8031","number":8031,"state":"open","locked":false,"title":"[WIP] fix issue 7804 - Allow __traits(getMember) as a BasicType","user":{"login":"BBasile","id":16154339,"avatar_url":"https://avatars1.githubusercontent.com/u/16154339?v=4","gravatar_id":"","url":"https://api.github.com/users/BBasile","html_url":"https://github.com/BBasile","followers_url":"https://api.github.com/users/BBasile/followers","following_url":"https://api.github.com/users/BBasile/following{/other_user}","gists_url":"https://api.github.com/users/BBasile/gists{/gist_id}","starred_url":"https://api.github.com/users/BBasile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBasile/subscriptions","organizations_url":"https://api.github.com/users/BBasile/orgs","repos_url":"https://api.github.com/users/BBasile/repos","events_url":"https://api.github.com/users/BBasile/events{/privacy}","received_events_url":"https://api.github.com/users/BBasile/received_events","type":"User","site_admin":false},"body":"To allow `alias AggrMember = __traits(getMember, Aggr, \"member\");` The `BasicType` grammar must be changed, since it's used by `AliasDeclarationY`.\r\n\r\n```diff\r\nBasicType:\r\n    BasicTypeX\r\n    . IdentifierList\r\n    IdentifierList\r\n    Typeof\r\n    Typeof . IdentifierList\r\n    TypeCtor ( Type )\r\n    TypeVector\r\n+    Traits\r\n```\r\n\r\nAs a bonus, declarations work with a `__traits` as type.\r\nAnother more limited option would have been to change the grammar of `AliasDeclarationY`:\r\n\r\n```diff\r\nAliasDeclarationY:\r\n    Identifier TemplateParametersopt = StorageClassesopt Type\r\n+    Identifier TemplateParametersopt = StorageClassesopt Traits\r\n    Identifier TemplateParametersopt = FunctionLiteral\r\n```\r\n\r\nFor now, only Types are handled. A second part will allow this for Symbols.","created_at":"2018-03-14T12:08:49Z","updated_at":"2018-03-23T20:30:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d85a318775a0e80ff811995219823186144026b2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":119377341,"url":"https://api.github.com/repos/dlang/dmd/labels/Enhancement","name":"Enhancement","color":"0052cc","default":false},{"id":639748221,"url":"https://api.github.com/repos/dlang/dmd/labels/WIP","name":"WIP","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dlang/dmd/pulls/8031/commits","review_comments_url":"https://api.github.com/repos/dlang/dmd/pulls/8031/comments","review_comment_url":"https://api.github.com/repos/dlang/dmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dlang/dmd/issues/8031/comments","statuses_url":"https://api.github.com/repos/dlang/dmd/statuses/620b9d289612ce673764ce31693078cd2e43600d","head":{"label":"BBasile:alias-equal-traits","ref":"alias-equal-traits","sha":"620b9d289612ce673764ce31693078cd2e43600d","user":{"login":"BBasile","id":16154339,"avatar_url":"https://avatars1.githubusercontent.com/u/16154339?v=4","gravatar_id":"","url":"https://api.github.com/users/BBasile","html_url":"https://github.com/BBasile","followers_url":"https://api.github.com/users/BBasile/followers","following_url":"https://api.github.com/users/BBasile/following{/other_user}","gists_url":"https://api.github.com/users/BBasile/gists{/gist_id}","starred_url":"https://api.github.com/users/BBasile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBasile/subscriptions","organizations_url":"https://api.github.com/users/BBasile/orgs","repos_url":"https://api.github.com/users/BBasile/repos","events_url":"https://api.github.com/users/BBasile/events{/privacy}","received_events_url":"https://api.github.com/users/BBasile/received_events","type":"User","site_admin":false},"repo":{"id":115869929,"name":"dmd","full_name":"BBasile/dmd","owner":{"login":"BBasile","id":16154339,"avatar_url":"https://avatars1.githubusercontent.com/u/16154339?v=4","gravatar_id":"","url":"https://api.github.com/users/BBasile","html_url":"https://github.com/BBasile","followers_url":"https://api.github.com/users/BBasile/followers","following_url":"https://api.github.com/users/BBasile/following{/other_user}","gists_url":"https://api.github.com/users/BBasile/gists{/gist_id}","starred_url":"https://api.github.com/users/BBasile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BBasile/subscriptions","organizations_url":"https://api.github.com/users/BBasile/orgs","repos_url":"https://api.github.com/users/BBasile/repos","events_url":"https://api.github.com/users/BBasile/events{/privacy}","received_events_url":"https://api.github.com/users/BBasile/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BBasile/dmd","description":"dmd D Programming Language compiler","fork":true,"url":"https://api.github.com/repos/BBasile/dmd","forks_url":"https://api.github.com/repos/BBasile/dmd/forks","keys_url":"https://api.github.com/repos/BBasile/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BBasile/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BBasile/dmd/teams","hooks_url":"https://api.github.com/repos/BBasile/dmd/hooks","issue_events_url":"https://api.github.com/repos/BBasile/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/BBasile/dmd/events","assignees_url":"https://api.github.com/repos/BBasile/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/BBasile/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/BBasile/dmd/tags","blobs_url":"https://api.github.com/repos/BBasile/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BBasile/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BBasile/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/BBasile/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BBasile/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/BBasile/dmd/languages","stargazers_url":"https://api.github.com/repos/BBasile/dmd/stargazers","contributors_url":"https://api.github.com/repos/BBasile/dmd/contributors","subscribers_url":"https://api.github.com/repos/BBasile/dmd/subscribers","subscription_url":"https://api.github.com/repos/BBasile/dmd/subscription","commits_url":"https://api.github.com/repos/BBasile/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/BBasile/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/BBasile/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/BBasile/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/BBasile/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/BBasile/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BBasile/dmd/merges","archive_url":"https://api.github.com/repos/BBasile/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BBasile/dmd/downloads","issues_url":"https://api.github.com/repos/BBasile/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/BBasile/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/BBasile/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/BBasile/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BBasile/dmd/labels{/name}","releases_url":"https://api.github.com/repos/BBasile/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/BBasile/dmd/deployments","created_at":"2017-12-31T15:13:36Z","updated_at":"2018-03-14T12:28:23Z","pushed_at":"2018-03-16T20:15:50Z","git_url":"git://github.com/BBasile/dmd.git","ssh_url":"git@github.com:BBasile/dmd.git","clone_url":"https://github.com/BBasile/dmd.git","svn_url":"https://github.com/BBasile/dmd","homepage":"dlang.org","size":86265,"stargazers_count":0,"watchers_count":0,"language":"D","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dlang:master","ref":"master","sha":"aa1b363ea7cd81b276963cf2a9bd416e3ccb36d5","user":{"login":"dlang","id":565913,"avatar_url":"https://avatars3.githubusercontent.com/u/565913?v=4","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"repo":{"id":1257070,"name":"dmd","full_name":"dlang/dmd","owner":{"login":"dlang","id":565913,"avatar_url":"https://avatars3.githubusercontent.com/u/565913?v=4","gravatar_id":"","url":"https://api.github.com/users/dlang","html_url":"https://github.com/dlang","followers_url":"https://api.github.com/users/dlang/followers","following_url":"https://api.github.com/users/dlang/following{/other_user}","gists_url":"https://api.github.com/users/dlang/gists{/gist_id}","starred_url":"https://api.github.com/users/dlang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlang/subscriptions","organizations_url":"https://api.github.com/users/dlang/orgs","repos_url":"https://api.github.com/users/dlang/repos","events_url":"https://api.github.com/users/dlang/events{/privacy}","received_events_url":"https://api.github.com/users/dlang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dlang/dmd","description":"dmd D Programming Language compiler","fork":false,"url":"https://api.github.com/repos/dlang/dmd","forks_url":"https://api.github.com/repos/dlang/dmd/forks","keys_url":"https://api.github.com/repos/dlang/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dlang/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dlang/dmd/teams","hooks_url":"https://api.github.com/repos/dlang/dmd/hooks","issue_events_url":"https://api.github.com/repos/dlang/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/dlang/dmd/events","assignees_url":"https://api.github.com/repos/dlang/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/dlang/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/dlang/dmd/tags","blobs_url":"https://api.github.com/repos/dlang/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dlang/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dlang/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/dlang/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dlang/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/dlang/dmd/languages","stargazers_url":"https://api.github.com/repos/dlang/dmd/stargazers","contributors_url":"https://api.github.com/repos/dlang/dmd/contributors","subscribers_url":"https://api.github.com/repos/dlang/dmd/subscribers","subscription_url":"https://api.github.com/repos/dlang/dmd/subscription","commits_url":"https://api.github.com/repos/dlang/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/dlang/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/dlang/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/dlang/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/dlang/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/dlang/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dlang/dmd/merges","archive_url":"https://api.github.com/repos/dlang/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dlang/dmd/downloads","issues_url":"https://api.github.com/repos/dlang/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/dlang/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/dlang/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/dlang/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dlang/dmd/labels{/name}","releases_url":"https://api.github.com/repos/dlang/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/dlang/dmd/deployments","created_at":"2011-01-15T06:53:53Z","updated_at":"2018-03-23T14:37:41Z","pushed_at":"2018-03-23T19:40:38Z","git_url":"git://github.com/dlang/dmd.git","ssh_url":"git@github.com:dlang/dmd.git","clone_url":"https://github.com/dlang/dmd.git","svn_url":"https://github.com/dlang/dmd","homepage":"dlang.org","size":87429,"stargazers_count":1766,"watchers_count":1766,"language":"D","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":444,"mirror_url":null,"archived":false,"open_issues_count":145,"license":{"key":"bsl-1.0","name":"Boost Software License 1.0","spdx_id":"BSL-1.0","url":"https://api.github.com/licenses/bsl-1.0"},"forks":444,"open_issues":145,"watchers":1766,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8031"},"html":{"href":"https://github.com/dlang/dmd/pull/8031"},"issue":{"href":"https://api.github.com/repos/dlang/dmd/issues/8031"},"comments":{"href":"https://api.github.com/repos/dlang/dmd/issues/8031/comments"},"review_comments":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8031/comments"},"review_comment":{"href":"https://api.github.com/repos/dlang/dmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8031/commits"},"statuses":{"href":"https://api.github.com/repos/dlang/dmd/statuses/620b9d289612ce673764ce31693078cd2e43600d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wilzbach"}}