{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/comments/97316963","pull_request_review_id":17921579,"id":97316963,"diff_hunk":"@@ -42,20 +42,24 @@ Declaration const* DeclarationContainer::conflictingDeclaration(\n \tif (m_invisibleDeclarations.count(*_name))\n \t\tdeclarations += m_invisibleDeclarations.at(*_name);\n \n-\tif (dynamic_cast<FunctionDefinition const*>(&_declaration))\n+\tif (dynamic_cast<FunctionDefinition const*>(&_declaration) ||\n+\t\tdynamic_cast<EventDefinition const*>(&_declaration)\n+\t\t)\n \t{\n-\t\t// check that all other declarations with the same name are functions or a public state variable\n+\t\t// check that all other declarations with the same name are functions or a public state variable or events.\n+\t\t// And then check that the signatures are different.\n \t\tfor (Declaration const* declaration: declarations)\n \t\t{\n-\t\t\tif (dynamic_cast<FunctionDefinition const*>(declaration))\n-\t\t\t\tcontinue;\n \t\t\tif (auto variableDeclaration = dynamic_cast<VariableDeclaration const*>(declaration))\n \t\t\t{\n \t\t\t\tif (variableDeclaration->isStateVariable() && !variableDeclaration->isConstant() && variableDeclaration->isPublic())\n \t\t\t\t\tcontinue;\n \t\t\t\treturn declaration;\n \t\t\t}\n-\t\t\treturn declaration;\n+\t\t\tif (!dynamic_cast<FunctionDefinition const*>(declaration) &&","path":"libsolidity/analysis/DeclarationContainer.cpp","position":23,"original_position":23,"commit_id":"865b46c65e67922861c7e1e62f24b7a1420a6cac","original_commit_id":"865b46c65e67922861c7e1e62f24b7a1420a6cac","user":{"login":"chriseth","id":9073706,"avatar_url":"https://avatars.githubusercontent.com/u/9073706?v=3","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"body":"Also: formatting","created_at":"2017-01-23T13:30:21Z","updated_at":"2017-01-23T13:32:38Z","html_url":"https://github.com/ethereum/solidity/pull/1245#discussion_r97316963","pull_request_url":"https://api.github.com/repos/ethereum/solidity/pulls/1245","_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments/97316963"},"html":{"href":"https://github.com/ethereum/solidity/pull/1245#discussion_r97316963"},"pull_request":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/1245"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/1245","id":89809266,"html_url":"https://github.com/ethereum/solidity/pull/1245","diff_url":"https://github.com/ethereum/solidity/pull/1245.diff","patch_url":"https://github.com/ethereum/solidity/pull/1245.patch","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/1245","number":1245,"state":"open","locked":false,"title":"Allow multiple events of the same name","user":{"login":"pirapira","id":44281,"avatar_url":"https://avatars.githubusercontent.com/u/44281?v=3","gravatar_id":"","url":"https://api.github.com/users/pirapira","html_url":"https://github.com/pirapira","followers_url":"https://api.github.com/users/pirapira/followers","following_url":"https://api.github.com/users/pirapira/following{/other_user}","gists_url":"https://api.github.com/users/pirapira/gists{/gist_id}","starred_url":"https://api.github.com/users/pirapira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirapira/subscriptions","organizations_url":"https://api.github.com/users/pirapira/orgs","repos_url":"https://api.github.com/users/pirapira/repos","events_url":"https://api.github.com/users/pirapira/events{/privacy}","received_events_url":"https://api.github.com/users/pirapira/received_events","type":"User","site_admin":false},"body":"After this PR the compiler does not complain when there are multiple events of the same name in the scope.  The treatment is similar to functions.  This fixes #1215.\n","created_at":"2016-10-18T12:55:48Z","updated_at":"2017-01-23T13:32:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66bf4c38d52fa031634a89e5b63b827b073a1e6b","assignee":{"login":"pirapira","id":44281,"avatar_url":"https://avatars.githubusercontent.com/u/44281?v=3","gravatar_id":"","url":"https://api.github.com/users/pirapira","html_url":"https://github.com/pirapira","followers_url":"https://api.github.com/users/pirapira/followers","following_url":"https://api.github.com/users/pirapira/following{/other_user}","gists_url":"https://api.github.com/users/pirapira/gists{/gist_id}","starred_url":"https://api.github.com/users/pirapira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirapira/subscriptions","organizations_url":"https://api.github.com/users/pirapira/orgs","repos_url":"https://api.github.com/users/pirapira/repos","events_url":"https://api.github.com/users/pirapira/events{/privacy}","received_events_url":"https://api.github.com/users/pirapira/received_events","type":"User","site_admin":false},"assignees":[{"login":"pirapira","id":44281,"avatar_url":"https://avatars.githubusercontent.com/u/44281?v=3","gravatar_id":"","url":"https://api.github.com/users/pirapira","html_url":"https://github.com/pirapira","followers_url":"https://api.github.com/users/pirapira/followers","following_url":"https://api.github.com/users/pirapira/following{/other_user}","gists_url":"https://api.github.com/users/pirapira/gists{/gist_id}","starred_url":"https://api.github.com/users/pirapira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pirapira/subscriptions","organizations_url":"https://api.github.com/users/pirapira/orgs","repos_url":"https://api.github.com/users/pirapira/repos","events_url":"https://api.github.com/users/pirapira/events{/privacy}","received_events_url":"https://api.github.com/users/pirapira/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/solidity/pulls/1245/commits","review_comments_url":"https://api.github.com/repos/ethereum/solidity/pulls/1245/comments","review_comment_url":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/1245/comments","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/865b46c65e67922861c7e1e62f24b7a1420a6cac","head":{"label":"ethereum:1215","ref":"1215","sha":"865b46c65e67922861c7e1e62f24b7a1420a6cac","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":40892817,"name":"solidity","full_name":"ethereum/solidity","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/solidity","description":"The Solidity Contract-Oriented Programming Language","fork":false,"url":"https://api.github.com/repos/ethereum/solidity","forks_url":"https://api.github.com/repos/ethereum/solidity/forks","keys_url":"https://api.github.com/repos/ethereum/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/solidity/teams","hooks_url":"https://api.github.com/repos/ethereum/solidity/hooks","issue_events_url":"https://api.github.com/repos/ethereum/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/solidity/events","assignees_url":"https://api.github.com/repos/ethereum/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/solidity/tags","blobs_url":"https://api.github.com/repos/ethereum/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/solidity/languages","stargazers_url":"https://api.github.com/repos/ethereum/solidity/stargazers","contributors_url":"https://api.github.com/repos/ethereum/solidity/contributors","subscribers_url":"https://api.github.com/repos/ethereum/solidity/subscribers","subscription_url":"https://api.github.com/repos/ethereum/solidity/subscription","commits_url":"https://api.github.com/repos/ethereum/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/solidity/merges","archive_url":"https://api.github.com/repos/ethereum/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/solidity/downloads","issues_url":"https://api.github.com/repos/ethereum/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/solidity/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/solidity/deployments","created_at":"2015-08-17T12:27:26Z","updated_at":"2017-01-22T22:07:25Z","pushed_at":"2017-01-23T13:28:00Z","git_url":"git://github.com/ethereum/solidity.git","ssh_url":"git@github.com:ethereum/solidity.git","clone_url":"https://github.com/ethereum/solidity.git","svn_url":"https://github.com/ethereum/solidity","homepage":"","size":10682,"stargazers_count":535,"watchers_count":535,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":240,"mirror_url":null,"open_issues_count":251,"forks":240,"open_issues":251,"watchers":535,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"09403dd5ede68e020cb2ff17a7958bf5b42979df","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":40892817,"name":"solidity","full_name":"ethereum/solidity","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars.githubusercontent.com/u/6250754?v=3","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/solidity","description":"The Solidity Contract-Oriented Programming Language","fork":false,"url":"https://api.github.com/repos/ethereum/solidity","forks_url":"https://api.github.com/repos/ethereum/solidity/forks","keys_url":"https://api.github.com/repos/ethereum/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/solidity/teams","hooks_url":"https://api.github.com/repos/ethereum/solidity/hooks","issue_events_url":"https://api.github.com/repos/ethereum/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/solidity/events","assignees_url":"https://api.github.com/repos/ethereum/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/solidity/tags","blobs_url":"https://api.github.com/repos/ethereum/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/solidity/languages","stargazers_url":"https://api.github.com/repos/ethereum/solidity/stargazers","contributors_url":"https://api.github.com/repos/ethereum/solidity/contributors","subscribers_url":"https://api.github.com/repos/ethereum/solidity/subscribers","subscription_url":"https://api.github.com/repos/ethereum/solidity/subscription","commits_url":"https://api.github.com/repos/ethereum/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/solidity/merges","archive_url":"https://api.github.com/repos/ethereum/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/solidity/downloads","issues_url":"https://api.github.com/repos/ethereum/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/solidity/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/solidity/deployments","created_at":"2015-08-17T12:27:26Z","updated_at":"2017-01-22T22:07:25Z","pushed_at":"2017-01-23T13:28:00Z","git_url":"git://github.com/ethereum/solidity.git","ssh_url":"git@github.com:ethereum/solidity.git","clone_url":"https://github.com/ethereum/solidity.git","svn_url":"https://github.com/ethereum/solidity","homepage":"","size":10682,"stargazers_count":535,"watchers_count":535,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":240,"mirror_url":null,"open_issues_count":251,"forks":240,"open_issues":251,"watchers":535,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/1245"},"html":{"href":"https://github.com/ethereum/solidity/pull/1245"},"issue":{"href":"https://api.github.com/repos/ethereum/solidity/issues/1245"},"comments":{"href":"https://api.github.com/repos/ethereum/solidity/issues/1245/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/1245/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/1245/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/solidity/statuses/865b46c65e67922861c7e1e62f24b7a1420a6cac"}}}}
{"actor":{"display_login":"chriseth"}}