{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/42310280","id":42310280,"diff_hunk":"@@ -1286,12 +1287,99 @@ public:\n             return;\n         assert(semanticRun <= PASSsemantic2);\n         semanticRun = PASSsemantic2;\n+\n+        //printf(\"FuncDeclaration::semantic2 [%s] fd0 = %s %s\\n\", this.loc.toChars(), this.toChars(), this.type.toChars());\n+\n+        if (overnext && !errors)\n+        {\n+            OutBuffer buf1;\n+            OutBuffer buf2;\n+\n+            // Always starts the lookup from 'this', because the conflicts with\n+            // previous overloads are already reported.\n+            auto f1 = this;\n+            mangleToFuncSignature(&buf1, f1);\n+\n+            overloadApply(f1, (Dsymbol s)\n+            {\n+                auto f2 = s.isFuncDeclaration();\n+                if (!f2|| f1 == f2 || f2.errors)\n+                    return 0;\n+\n+                // Don't have to check conflict between declaration and definition.\n+                if ((f1.fbody !is null) != (f2.fbody !is null))\n+                    return 0;\n+\n+                /* Check for overload merging with base class member functions.\n+                 *\n+                 *  class B { void foo() {} }\n+                 *  class D : B {\n+                 *    override void foo() {}    // B.foo appears as f2\n+                 *    alias foo = B.foo;\n+                 *  }\n+                 */\n+                foreach (f; f1.foverrides)\n+                {\n+                    if (f == f2)\n+                        return 0;\n+                }\n+\n+                // extern (C) functions always conflict each other.\n+                if (f1.ident == f2.ident &&\n+                    f1.toParent2() == f2.toParent2() &&\n+                    f1.linkage == LINKc && f2.linkage == LINKc)\n+                {\n+                    /* Allow the hack that is actually used in druntime,\n+                     * to ignore function attributes for extern (C) functions.\n+                     * TODO: Must be reconsidered in the future.\n+                     *\n+                     *  extern(C):\n+                     *  alias sigfn_t  = void function(int);\n+                     *  alias sigfn_t2 = void function(int) nothrow @nogc;\n+                     *  sigfn_t  bsd_signal(int sig, sigfn_t  func);\n+                     *  sigfn_t2 bsd_signal(int sig, sigfn_t2 func) nothrow @nogc;  // no error\n+                     */\n+                    if (f1.fbody is null || f2.fbody is null)\n+                        return 0;\n+\n+                    auto tf1 = cast(TypeFunction)f1.type;\n+                    auto tf2 = cast(TypeFunction)f2.type;\n+                    f2.error(\"%s conflicts with at %s because of extern (C)\",","path":"src/func.d","position":null,"original_position":69,"commit_id":"a45db0c0816c6b21fdeac03a87b6262fc4ef12d2","original_commit_id":"274d67c8d0294c4418bcd59a7529a7d4bebfc594","user":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"body":"> They're not designed for overloading, and I think it would be best to simply disallow it.\r\n\r\nOK, make sense. ","created_at":"2015-10-17T15:18:17Z","updated_at":"2015-10-17T15:18:17Z","html_url":"https://github.com/D-Programming-Language/dmd/pull/4396#discussion_r42310280","pull_request_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4396","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments/42310280"},"html":{"href":"https://github.com/D-Programming-Language/dmd/pull/4396#discussion_r42310280"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4396"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4396","id":28881133,"html_url":"https://github.com/D-Programming-Language/dmd/pull/4396","diff_url":"https://github.com/D-Programming-Language/dmd/pull/4396.diff","patch_url":"https://github.com/D-Programming-Language/dmd/pull/4396.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4396","number":4396,"state":"open","locked":false,"title":"Issue 14147 - Compiler crash on identical functions in a single module","user":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"body":"https://issues.dlang.org/show_bug.cgi?id=14147\r\n\r\nPartial fix for [issue 2789](https://issues.dlang.org/show_bug.cgi?id=2789).","created_at":"2015-02-08T14:43:44Z","updated_at":"2015-10-17T15:18:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca2a44731d579eed51e54852197e85961df92379","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4396/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4396/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4396/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/a45db0c0816c6b21fdeac03a87b6262fc4ef12d2","head":{"label":"9rnsr:fix14147","ref":"fix14147","sha":"a45db0c0816c6b21fdeac03a87b6262fc4ef12d2","user":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"repo":{"id":1434550,"name":"dmd","full_name":"9rnsr/dmd","owner":{"login":"9rnsr","id":254394,"avatar_url":"https://avatars.githubusercontent.com/u/254394?v=3","gravatar_id":"","url":"https://api.github.com/users/9rnsr","html_url":"https://github.com/9rnsr","followers_url":"https://api.github.com/users/9rnsr/followers","following_url":"https://api.github.com/users/9rnsr/following{/other_user}","gists_url":"https://api.github.com/users/9rnsr/gists{/gist_id}","starred_url":"https://api.github.com/users/9rnsr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9rnsr/subscriptions","organizations_url":"https://api.github.com/users/9rnsr/orgs","repos_url":"https://api.github.com/users/9rnsr/repos","events_url":"https://api.github.com/users/9rnsr/events{/privacy}","received_events_url":"https://api.github.com/users/9rnsr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/9rnsr/dmd","description":"dmd D Programming Language compiler","fork":true,"url":"https://api.github.com/repos/9rnsr/dmd","forks_url":"https://api.github.com/repos/9rnsr/dmd/forks","keys_url":"https://api.github.com/repos/9rnsr/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/9rnsr/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/9rnsr/dmd/teams","hooks_url":"https://api.github.com/repos/9rnsr/dmd/hooks","issue_events_url":"https://api.github.com/repos/9rnsr/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/9rnsr/dmd/events","assignees_url":"https://api.github.com/repos/9rnsr/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/9rnsr/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/9rnsr/dmd/tags","blobs_url":"https://api.github.com/repos/9rnsr/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/9rnsr/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/9rnsr/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/9rnsr/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/9rnsr/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/9rnsr/dmd/languages","stargazers_url":"https://api.github.com/repos/9rnsr/dmd/stargazers","contributors_url":"https://api.github.com/repos/9rnsr/dmd/contributors","subscribers_url":"https://api.github.com/repos/9rnsr/dmd/subscribers","subscription_url":"https://api.github.com/repos/9rnsr/dmd/subscription","commits_url":"https://api.github.com/repos/9rnsr/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/9rnsr/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/9rnsr/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/9rnsr/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/9rnsr/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/9rnsr/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/9rnsr/dmd/merges","archive_url":"https://api.github.com/repos/9rnsr/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/9rnsr/dmd/downloads","issues_url":"https://api.github.com/repos/9rnsr/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/9rnsr/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/9rnsr/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/9rnsr/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/9rnsr/dmd/labels{/name}","releases_url":"https://api.github.com/repos/9rnsr/dmd/releases{/id}","created_at":"2011-03-03T10:24:37Z","updated_at":"2015-08-23T13:19:40Z","pushed_at":"2015-10-17T13:31:45Z","git_url":"git://github.com/9rnsr/dmd.git","ssh_url":"git@github.com:9rnsr/dmd.git","clone_url":"https://github.com/9rnsr/dmd.git","svn_url":"https://github.com/9rnsr/dmd","homepage":"d-programming-language.org","size":76255,"stargazers_count":2,"watchers_count":2,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"21bb8efff4e9cd05b160475120088a1f36dfc798","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257070,"name":"dmd","full_name":"D-Programming-Language/dmd","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/dmd","description":"dmd D Programming Language compiler","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/dmd","forks_url":"https://api.github.com/repos/D-Programming-Language/dmd/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/dmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/dmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/dmd/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/dmd/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/dmd/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/dmd/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/dmd/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/dmd/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/dmd/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/dmd/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/dmd/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/dmd/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/dmd/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/dmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/dmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/D-Programming-Language/dmd/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/dmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/dmd/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/dmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/dmd/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/dmd/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/dmd/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/dmd/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/dmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/dmd/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/dmd/releases{/id}","created_at":"2011-01-15T06:53:53Z","updated_at":"2015-10-17T01:03:02Z","pushed_at":"2015-10-17T13:30:37Z","git_url":"git://github.com/D-Programming-Language/dmd.git","ssh_url":"git@github.com:D-Programming-Language/dmd.git","clone_url":"https://github.com/D-Programming-Language/dmd.git","svn_url":"https://github.com/D-Programming-Language/dmd","homepage":"dlang.org","size":108555,"stargazers_count":1091,"watchers_count":1091,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":335,"mirror_url":null,"open_issues_count":134,"forks":335,"open_issues":134,"watchers":1091,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4396"},"html":{"href":"https://github.com/D-Programming-Language/dmd/pull/4396"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4396"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/issues/4396/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4396/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/pulls/4396/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/dmd/statuses/a45db0c0816c6b21fdeac03a87b6262fc4ef12d2"}}}}