{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/comments/147552594","pull_request_review_id":72669790,"id":147552594,"diff_hunk":"@@ -74,3 +74,25 @@ void ConstantEvaluator::endVisit(Literal const& _literal)\n \tif (!_literal.annotation().type)\n \t\tm_errorReporter.fatalTypeError(_literal.location(), \"Invalid literal value.\");\n }\n+\n+void ConstantEvaluator::endVisit(Identifier const& _identifier)\n+{\n+\tVariableDeclaration const *variableDeclaration = dynamic_cast<VariableDeclaration const *>(_identifier.annotation().referencedDeclaration);\n+\tif (!variableDeclaration)\n+\t\treturn;","path":"libsolidity/analysis/ConstantEvaluator.cpp","position":9,"original_position":9,"commit_id":"5f96cccea3719f4aee7d908842a18845b605adfa","original_commit_id":"5f96cccea3719f4aee7d908842a18845b605adfa","user":{"login":"axic","id":20340,"avatar_url":"https://avatars3.githubusercontent.com/u/20340?v=4","gravatar_id":"","url":"https://api.github.com/users/axic","html_url":"https://github.com/axic","followers_url":"https://api.github.com/users/axic/followers","following_url":"https://api.github.com/users/axic/following{/other_user}","gists_url":"https://api.github.com/users/axic/gists{/gist_id}","starred_url":"https://api.github.com/users/axic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axic/subscriptions","organizations_url":"https://api.github.com/users/axic/orgs","repos_url":"https://api.github.com/users/axic/repos","events_url":"https://api.github.com/users/axic/events{/privacy}","received_events_url":"https://api.github.com/users/axic/received_events","type":"User","site_admin":false},"body":"There should be a test for this, ie. `function f() {} uint[f] tmp;`","created_at":"2017-10-28T11:44:54Z","updated_at":"2017-10-28T11:44:54Z","html_url":"https://github.com/ethereum/solidity/pull/3142#discussion_r147552594","pull_request_url":"https://api.github.com/repos/ethereum/solidity/pulls/3142","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments/147552594"},"html":{"href":"https://github.com/ethereum/solidity/pull/3142#discussion_r147552594"},"pull_request":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/3142"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/solidity/pulls/3142","id":149330713,"html_url":"https://github.com/ethereum/solidity/pull/3142","diff_url":"https://github.com/ethereum/solidity/pull/3142.diff","patch_url":"https://github.com/ethereum/solidity/pull/3142.patch","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/3142","number":3142,"state":"open","locked":false,"title":"Allow constant integer variables as array lengths. Closes #716","user":{"login":"Balajiganapathi","id":3313154,"avatar_url":"https://avatars2.githubusercontent.com/u/3313154?v=4","gravatar_id":"","url":"https://api.github.com/users/Balajiganapathi","html_url":"https://github.com/Balajiganapathi","followers_url":"https://api.github.com/users/Balajiganapathi/followers","following_url":"https://api.github.com/users/Balajiganapathi/following{/other_user}","gists_url":"https://api.github.com/users/Balajiganapathi/gists{/gist_id}","starred_url":"https://api.github.com/users/Balajiganapathi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Balajiganapathi/subscriptions","organizations_url":"https://api.github.com/users/Balajiganapathi/orgs","repos_url":"https://api.github.com/users/Balajiganapathi/repos","events_url":"https://api.github.com/users/Balajiganapathi/events{/privacy}","received_events_url":"https://api.github.com/users/Balajiganapathi/received_events","type":"User","site_admin":false},"body":"I have extended ConstantEvaluator to support identifiers. It also recursively calls in case of more constant references. ","created_at":"2017-10-28T11:05:35Z","updated_at":"2017-10-28T11:44:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7b488c3c0a076b2ec49b0c0d3a637983f4b5cfb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/solidity/pulls/3142/commits","review_comments_url":"https://api.github.com/repos/ethereum/solidity/pulls/3142/comments","review_comment_url":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/3142/comments","statuses_url":"https://api.github.com/repos/ethereum/solidity/statuses/5f96cccea3719f4aee7d908842a18845b605adfa","head":{"label":"Balajiganapathi:allow_constant_array_length","ref":"allow_constant_array_length","sha":"5f96cccea3719f4aee7d908842a18845b605adfa","user":{"login":"Balajiganapathi","id":3313154,"avatar_url":"https://avatars2.githubusercontent.com/u/3313154?v=4","gravatar_id":"","url":"https://api.github.com/users/Balajiganapathi","html_url":"https://github.com/Balajiganapathi","followers_url":"https://api.github.com/users/Balajiganapathi/followers","following_url":"https://api.github.com/users/Balajiganapathi/following{/other_user}","gists_url":"https://api.github.com/users/Balajiganapathi/gists{/gist_id}","starred_url":"https://api.github.com/users/Balajiganapathi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Balajiganapathi/subscriptions","organizations_url":"https://api.github.com/users/Balajiganapathi/orgs","repos_url":"https://api.github.com/users/Balajiganapathi/repos","events_url":"https://api.github.com/users/Balajiganapathi/events{/privacy}","received_events_url":"https://api.github.com/users/Balajiganapathi/received_events","type":"User","site_admin":false},"repo":{"id":107706923,"name":"solidity","full_name":"Balajiganapathi/solidity","owner":{"login":"Balajiganapathi","id":3313154,"avatar_url":"https://avatars2.githubusercontent.com/u/3313154?v=4","gravatar_id":"","url":"https://api.github.com/users/Balajiganapathi","html_url":"https://github.com/Balajiganapathi","followers_url":"https://api.github.com/users/Balajiganapathi/followers","following_url":"https://api.github.com/users/Balajiganapathi/following{/other_user}","gists_url":"https://api.github.com/users/Balajiganapathi/gists{/gist_id}","starred_url":"https://api.github.com/users/Balajiganapathi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Balajiganapathi/subscriptions","organizations_url":"https://api.github.com/users/Balajiganapathi/orgs","repos_url":"https://api.github.com/users/Balajiganapathi/repos","events_url":"https://api.github.com/users/Balajiganapathi/events{/privacy}","received_events_url":"https://api.github.com/users/Balajiganapathi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Balajiganapathi/solidity","description":"The Solidity Contract-Oriented Programming Language","fork":true,"url":"https://api.github.com/repos/Balajiganapathi/solidity","forks_url":"https://api.github.com/repos/Balajiganapathi/solidity/forks","keys_url":"https://api.github.com/repos/Balajiganapathi/solidity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Balajiganapathi/solidity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Balajiganapathi/solidity/teams","hooks_url":"https://api.github.com/repos/Balajiganapathi/solidity/hooks","issue_events_url":"https://api.github.com/repos/Balajiganapathi/solidity/issues/events{/number}","events_url":"https://api.github.com/repos/Balajiganapathi/solidity/events","assignees_url":"https://api.github.com/repos/Balajiganapathi/solidity/assignees{/user}","branches_url":"https://api.github.com/repos/Balajiganapathi/solidity/branches{/branch}","tags_url":"https://api.github.com/repos/Balajiganapathi/solidity/tags","blobs_url":"https://api.github.com/repos/Balajiganapathi/solidity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Balajiganapathi/solidity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Balajiganapathi/solidity/git/refs{/sha}","trees_url":"https://api.github.com/repos/Balajiganapathi/solidity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Balajiganapathi/solidity/statuses/{sha}","languages_url":"https://api.github.com/repos/Balajiganapathi/solidity/languages","stargazers_url":"https://api.github.com/repos/Balajiganapathi/solidity/stargazers","contributors_url":"https://api.github.com/repos/Balajiganapathi/solidity/contributors","subscribers_url":"https://api.github.com/repos/Balajiganapathi/solidity/subscribers","subscription_url":"https://api.github.com/repos/Balajiganapathi/solidity/subscription","commits_url":"https://api.github.com/repos/Balajiganapathi/solidity/commits{/sha}","git_commits_url":"https://api.github.com/repos/Balajiganapathi/solidity/git/commits{/sha}","comments_url":"https://api.github.com/repos/Balajiganapathi/solidity/comments{/number}","issue_comment_url":"https://api.github.com/repos/Balajiganapathi/solidity/issues/comments{/number}","contents_url":"https://api.github.com/repos/Balajiganapathi/solidity/contents/{+path}","compare_url":"https://api.github.com/repos/Balajiganapathi/solidity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Balajiganapathi/solidity/merges","archive_url":"https://api.github.com/repos/Balajiganapathi/solidity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Balajiganapathi/solidity/downloads","issues_url":"https://api.github.com/repos/Balajiganapathi/solidity/issues{/number}","pulls_url":"https://api.github.com/repos/Balajiganapathi/solidity/pulls{/number}","milestones_url":"https://api.github.com/repos/Balajiganapathi/solidity/milestones{/number}","notifications_url":"https://api.github.com/repos/Balajiganapathi/solidity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Balajiganapathi/solidity/labels{/name}","releases_url":"https://api.github.com/repos/Balajiganapathi/solidity/releases{/id}","deployments_url":"https://api.github.com/repos/Balajiganapathi/solidity/deployments","created_at":"2017-10-20T17:28:07Z","updated_at":"2017-10-20T17:28:10Z","pushed_at":"2017-10-28T11:03:20Z","git_url":"git://github.com/Balajiganapathi/solidity.git","ssh_url":"git@github.com:Balajiganapathi/solidity.git","clone_url":"https://github.com/Balajiganapathi/solidity.git","svn_url":"https://github.com/Balajiganapathi/solidity","homepage":"","size":16055,"stargazers_count":0,"watchers_count":0,"language":"C++","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,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"ethereum:develop","ref":"develop","sha":"1e085f85de1b3c389d3580db444cbe55cfaa754e","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","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://avatars3.githubusercontent.com/u/6250754?v=4","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-10-28T11:24:58Z","pushed_at":"2017-10-28T11:05:36Z","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":16062,"stargazers_count":2084,"watchers_count":2084,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":639,"mirror_url":null,"archived":false,"open_issues_count":401,"forks":639,"open_issues":401,"watchers":2084,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/3142"},"html":{"href":"https://github.com/ethereum/solidity/pull/3142"},"issue":{"href":"https://api.github.com/repos/ethereum/solidity/issues/3142"},"comments":{"href":"https://api.github.com/repos/ethereum/solidity/issues/3142/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/3142/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/solidity/pulls/3142/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/solidity/statuses/5f96cccea3719f4aee7d908842a18845b605adfa"}},"author_association":"NONE"}}
{"actor":{"display_login":"axic"}}