{"action":"created","comment":{"url":"https://api.github.com/repos/dlang/dmd/pulls/comments/179976230","pull_request_review_id":110315984,"id":179976230,"diff_hunk":"@@ -105,53 +105,118 @@ struct CtorFlow\n \n \n /****************************************\n- * Merge fi flow analysis results into fieldInit.\n+ * Merge `b` flow analysis results into `a`.\n  * Params:\n- *      fieldInit = the path to merge fi into\n- *      fi = the other path\n+ *      a = the path to merge `b` into\n+ *      b = the other path\n  * Returns:\n- *      false means either fieldInit or fi skips initialization\n+ *      false means one of the paths skips construction\n  */\n-bool mergeFieldInitX(ref CSX fieldInit, const CSX fi)\n+bool mergeCallSuper(ref CSX a, const CSX b) pure nothrow\n {\n-    if (fi != fieldInit)\n+    // This does a primitive flow analysis to support the restrictions\n+    // regarding when and how constructors can appear.\n+    // It merges the results of two paths.\n+    // The two paths are `a` and `b`; the result is merged into `a`.\n+    bool ok = true;\n+    if (b != a)","path":"src/dmd/ctorflow.d","position":33,"original_position":33,"commit_id":"ca314206f0bba92ece0b12205ee85d0c30d372a4","original_commit_id":"ca314206f0bba92ece0b12205ee85d0c30d372a4","user":{"login":"andralex","id":566679,"avatar_url":"https://avatars1.githubusercontent.com/u/566679?v=4","gravatar_id":"","url":"https://api.github.com/users/andralex","html_url":"https://github.com/andralex","followers_url":"https://api.github.com/users/andralex/followers","following_url":"https://api.github.com/users/andralex/following{/other_user}","gists_url":"https://api.github.com/users/andralex/gists{/gist_id}","starred_url":"https://api.github.com/users/andralex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andralex/subscriptions","organizations_url":"https://api.github.com/users/andralex/orgs","repos_url":"https://api.github.com/users/andralex/repos","events_url":"https://api.github.com/users/andralex/events{/privacy}","received_events_url":"https://api.github.com/users/andralex/received_events","type":"User","site_admin":false},"body":"The function does nothing and returns `true` if `a == b`, yet it takes the reader a whopping 47 lines to figure that out. Can we please please please with Truvia on top renounce this crap:\r\n\r\n```d\r\nbool ok = true;\r\nif (condition)\r\n{\r\n    ... so many lines ...\r\n}\r\nreturn ok;\r\n```\r\n\r\nThis antipattern is all over the compiler code. It's insufferable in old code, and definitely not tolerable in the sligthest in new code. We're not coding Fortran over here. Please:\r\n\r\n```d\r\nif (!condition)\r\n{\r\n    return true;\r\n}\r\n... knock yourself out ...\r\n```\r\n","created_at":"2018-04-09T02:36:52Z","updated_at":"2018-04-09T02:43:37Z","html_url":"https://github.com/dlang/dmd/pull/8148#discussion_r179976230","pull_request_url":"https://api.github.com/repos/dlang/dmd/pulls/8148","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/dlang/dmd/pulls/comments/179976230"},"html":{"href":"https://github.com/dlang/dmd/pull/8148#discussion_r179976230"},"pull_request":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8148"}}},"pull_request":{"url":"https://api.github.com/repos/dlang/dmd/pulls/8148","id":179885861,"html_url":"https://github.com/dlang/dmd/pull/8148","diff_url":"https://github.com/dlang/dmd/pull/8148.diff","patch_url":"https://github.com/dlang/dmd/pull/8148.patch","issue_url":"https://api.github.com/repos/dlang/dmd/issues/8148","number":8148,"state":"open","locked":false,"title":"refactor: redo CSX merge logic layout and names","user":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars0.githubusercontent.com/u/568298?v=4","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"body":"The idea is to:\r\n\r\n* push CSX logic into ctorflow.d\r\n* push error handling into dscope.d\r\n* use `a` and `b` for left and right branches","created_at":"2018-04-06T08:38:37Z","updated_at":"2018-04-09T02:43:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca37740d39a4221adb1f74ef97857f0a6e5a719e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dlang/dmd/pulls/8148/commits","review_comments_url":"https://api.github.com/repos/dlang/dmd/pulls/8148/comments","review_comment_url":"https://api.github.com/repos/dlang/dmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dlang/dmd/issues/8148/comments","statuses_url":"https://api.github.com/repos/dlang/dmd/statuses/ca314206f0bba92ece0b12205ee85d0c30d372a4","head":{"label":"WalterBright:merge-CSX","ref":"merge-CSX","sha":"ca314206f0bba92ece0b12205ee85d0c30d372a4","user":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars0.githubusercontent.com/u/568298?v=4","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"repo":{"id":7849157,"name":"dmd","full_name":"WalterBright/dmd","owner":{"login":"WalterBright","id":568298,"avatar_url":"https://avatars0.githubusercontent.com/u/568298?v=4","gravatar_id":"","url":"https://api.github.com/users/WalterBright","html_url":"https://github.com/WalterBright","followers_url":"https://api.github.com/users/WalterBright/followers","following_url":"https://api.github.com/users/WalterBright/following{/other_user}","gists_url":"https://api.github.com/users/WalterBright/gists{/gist_id}","starred_url":"https://api.github.com/users/WalterBright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WalterBright/subscriptions","organizations_url":"https://api.github.com/users/WalterBright/orgs","repos_url":"https://api.github.com/users/WalterBright/repos","events_url":"https://api.github.com/users/WalterBright/events{/privacy}","received_events_url":"https://api.github.com/users/WalterBright/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/WalterBright/dmd","description":"dmd D Programming Language compiler","fork":true,"url":"https://api.github.com/repos/WalterBright/dmd","forks_url":"https://api.github.com/repos/WalterBright/dmd/forks","keys_url":"https://api.github.com/repos/WalterBright/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WalterBright/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WalterBright/dmd/teams","hooks_url":"https://api.github.com/repos/WalterBright/dmd/hooks","issue_events_url":"https://api.github.com/repos/WalterBright/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/WalterBright/dmd/events","assignees_url":"https://api.github.com/repos/WalterBright/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/WalterBright/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/WalterBright/dmd/tags","blobs_url":"https://api.github.com/repos/WalterBright/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WalterBright/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WalterBright/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/WalterBright/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WalterBright/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/WalterBright/dmd/languages","stargazers_url":"https://api.github.com/repos/WalterBright/dmd/stargazers","contributors_url":"https://api.github.com/repos/WalterBright/dmd/contributors","subscribers_url":"https://api.github.com/repos/WalterBright/dmd/subscribers","subscription_url":"https://api.github.com/repos/WalterBright/dmd/subscription","commits_url":"https://api.github.com/repos/WalterBright/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/WalterBright/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/WalterBright/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/WalterBright/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/WalterBright/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/WalterBright/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WalterBright/dmd/merges","archive_url":"https://api.github.com/repos/WalterBright/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WalterBright/dmd/downloads","issues_url":"https://api.github.com/repos/WalterBright/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/WalterBright/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/WalterBright/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/WalterBright/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WalterBright/dmd/labels{/name}","releases_url":"https://api.github.com/repos/WalterBright/dmd/releases{/id}","deployments_url":"https://api.github.com/repos/WalterBright/dmd/deployments","created_at":"2013-01-27T06:45:40Z","updated_at":"2018-04-08T04:10:35Z","pushed_at":"2018-04-08T21:37:49Z","git_url":"git://github.com/WalterBright/dmd.git","ssh_url":"git@github.com:WalterBright/dmd.git","clone_url":"https://github.com/WalterBright/dmd.git","svn_url":"https://github.com/WalterBright/dmd","homepage":"d-programming-language.org","size":83371,"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":1,"mirror_url":null,"archived":false,"open_issues_count":0,"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":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dlang:master","ref":"master","sha":"3cf5d36578ff612654fddb8f0bb679257e5e4f3f","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-04-08T18:59:47Z","pushed_at":"2018-04-08T21:37:52Z","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":88151,"stargazers_count":1776,"watchers_count":1776,"language":"D","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":446,"mirror_url":null,"archived":false,"open_issues_count":152,"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":446,"open_issues":152,"watchers":1776,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8148"},"html":{"href":"https://github.com/dlang/dmd/pull/8148"},"issue":{"href":"https://api.github.com/repos/dlang/dmd/issues/8148"},"comments":{"href":"https://api.github.com/repos/dlang/dmd/issues/8148/comments"},"review_comments":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8148/comments"},"review_comment":{"href":"https://api.github.com/repos/dlang/dmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dlang/dmd/pulls/8148/commits"},"statuses":{"href":"https://api.github.com/repos/dlang/dmd/statuses/ca314206f0bba92ece0b12205ee85d0c30d372a4"}},"author_association":"OWNER"}}
{"actor":{"display_login":"andralex"}}