{"action":"opened","number":853,"pull_request":{"url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls/853","id":166848735,"html_url":"https://github.com/imageworks/OpenShadingLanguage/pull/853","diff_url":"https://github.com/imageworks/OpenShadingLanguage/pull/853.diff","patch_url":"https://github.com/imageworks/OpenShadingLanguage/pull/853.patch","issue_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/issues/853","number":853,"state":"open","locked":false,"title":"Function redefinitions","user":{"login":"marsupial","id":1831409,"avatar_url":"https://avatars2.githubusercontent.com/u/1831409?v=4","gravatar_id":"","url":"https://api.github.com/users/marsupial","html_url":"https://github.com/marsupial","followers_url":"https://api.github.com/users/marsupial/followers","following_url":"https://api.github.com/users/marsupial/following{/other_user}","gists_url":"https://api.github.com/users/marsupial/gists{/gist_id}","starred_url":"https://api.github.com/users/marsupial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marsupial/subscriptions","organizations_url":"https://api.github.com/users/marsupial/orgs","repos_url":"https://api.github.com/users/marsupial/repos","events_url":"https://api.github.com/users/marsupial/events{/privacy}","received_events_url":"https://api.github.com/users/marsupial/received_events","type":"User","site_admin":false},"body":"## Description\r\nOSL is currently warning about redeclaration which is totally legal.\r\nThe first commit fixes the issue and adds additional context as to where it was previously defined.\r\nIt also moves to an actual error as it was unclear given the test name whether it is wanted to be a warning or an error\r\n\r\nThe second commit moves it back to a warning, which I get as beneficial for debugging purposes.\r\nBut that does mean that part of the language spec is that functions are bound to the last definition which existed before the call site and tests against that.\r\n\r\n```\r\npoint abs (point p) {\r\n  printf (\"Alternate abs!\\n\");\r\n  return abs(p); // Should call original, not recurse\r\n}\r\n\r\nint redclfunc (int f) { return 0; }  // ok\r\nint redclfunc (int f) { return 1; }  // fail\r\n\r\nvoid subroutineA() {\r\n    printf (\"subroutineA.redclfunc = %d\\n\", redclfunc(32));\r\n}\r\n\r\nshader test() {\r\n    printf (\"abs(P)= %g\\n\", abs(P));\r\n    subroutineA();\r\n    printf (\"redclfunc = %d\\n\", redclfunc(32));\r\n}\r\n```\r\nShould lead to:\r\n```\r\nAlternate abs!\r\nabs(P)= 0.5 0.5 1\r\nsubroutineA.redclfunc = 1\r\nredclfunc = 2\r\n```\r\n## Tests\r\nUpdated **oslc-err-funcredef** and then moved to **function-redef**\r\n\r\n## Checklist:\r\n\r\n<!-- Put an 'x' in the boxes as you complete the checklist items -->\r\n\r\n- [x] I have read the [contribution guidelines](../CONTRIBUTING.md).\r\n- [x] I have previously submitted a [Contributor License Agreement](http://opensource.imageworks.com/cla/).\r\n- [x] I have updated the documentation, if applicable.\r\n- [x] I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).\r\n- [x] My code follows the prevailing code style of this project.\r\n","created_at":"2018-02-02T16:41:51Z","updated_at":"2018-02-02T16:41:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls/853/commits","review_comments_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls/853/comments","review_comment_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/issues/853/comments","statuses_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/statuses/97574f5044ca3a66657b2e8c84a126e6bb6786b9","head":{"label":"marsupial:function-redef","ref":"function-redef","sha":"97574f5044ca3a66657b2e8c84a126e6bb6786b9","user":{"login":"marsupial","id":1831409,"avatar_url":"https://avatars2.githubusercontent.com/u/1831409?v=4","gravatar_id":"","url":"https://api.github.com/users/marsupial","html_url":"https://github.com/marsupial","followers_url":"https://api.github.com/users/marsupial/followers","following_url":"https://api.github.com/users/marsupial/following{/other_user}","gists_url":"https://api.github.com/users/marsupial/gists{/gist_id}","starred_url":"https://api.github.com/users/marsupial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marsupial/subscriptions","organizations_url":"https://api.github.com/users/marsupial/orgs","repos_url":"https://api.github.com/users/marsupial/repos","events_url":"https://api.github.com/users/marsupial/events{/privacy}","received_events_url":"https://api.github.com/users/marsupial/received_events","type":"User","site_admin":false},"repo":{"id":79429739,"name":"OpenShadingLanguage","full_name":"marsupial/OpenShadingLanguage","owner":{"login":"marsupial","id":1831409,"avatar_url":"https://avatars2.githubusercontent.com/u/1831409?v=4","gravatar_id":"","url":"https://api.github.com/users/marsupial","html_url":"https://github.com/marsupial","followers_url":"https://api.github.com/users/marsupial/followers","following_url":"https://api.github.com/users/marsupial/following{/other_user}","gists_url":"https://api.github.com/users/marsupial/gists{/gist_id}","starred_url":"https://api.github.com/users/marsupial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marsupial/subscriptions","organizations_url":"https://api.github.com/users/marsupial/orgs","repos_url":"https://api.github.com/users/marsupial/repos","events_url":"https://api.github.com/users/marsupial/events{/privacy}","received_events_url":"https://api.github.com/users/marsupial/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marsupial/OpenShadingLanguage","description":"Advanced shading language for production GI renderers","fork":true,"url":"https://api.github.com/repos/marsupial/OpenShadingLanguage","forks_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/forks","keys_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/teams","hooks_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/hooks","issue_events_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/issues/events{/number}","events_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/events","assignees_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/assignees{/user}","branches_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/branches{/branch}","tags_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/tags","blobs_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/git/refs{/sha}","trees_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/statuses/{sha}","languages_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/languages","stargazers_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/stargazers","contributors_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/contributors","subscribers_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/subscribers","subscription_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/subscription","commits_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/commits{/sha}","git_commits_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/git/commits{/sha}","comments_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/comments{/number}","issue_comment_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/issues/comments{/number}","contents_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/contents/{+path}","compare_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/merges","archive_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/downloads","issues_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/issues{/number}","pulls_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/pulls{/number}","milestones_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/milestones{/number}","notifications_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/labels{/name}","releases_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/releases{/id}","deployments_url":"https://api.github.com/repos/marsupial/OpenShadingLanguage/deployments","created_at":"2017-01-19T07:59:35Z","updated_at":"2017-01-19T07:59:39Z","pushed_at":"2018-02-02T16:25:57Z","git_url":"git://github.com/marsupial/OpenShadingLanguage.git","ssh_url":"git@github.com:marsupial/OpenShadingLanguage.git","clone_url":"https://github.com/marsupial/OpenShadingLanguage.git","svn_url":"https://github.com/marsupial/OpenShadingLanguage","homepage":"","size":155341,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"imageworks:master","ref":"master","sha":"4cc1f66294e43a57f8a86c1c4485ddb619778824","user":{"login":"imageworks","id":320618,"avatar_url":"https://avatars0.githubusercontent.com/u/320618?v=4","gravatar_id":"","url":"https://api.github.com/users/imageworks","html_url":"https://github.com/imageworks","followers_url":"https://api.github.com/users/imageworks/followers","following_url":"https://api.github.com/users/imageworks/following{/other_user}","gists_url":"https://api.github.com/users/imageworks/gists{/gist_id}","starred_url":"https://api.github.com/users/imageworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imageworks/subscriptions","organizations_url":"https://api.github.com/users/imageworks/orgs","repos_url":"https://api.github.com/users/imageworks/repos","events_url":"https://api.github.com/users/imageworks/events{/privacy}","received_events_url":"https://api.github.com/users/imageworks/received_events","type":"Organization","site_admin":false},"repo":{"id":1461954,"name":"OpenShadingLanguage","full_name":"imageworks/OpenShadingLanguage","owner":{"login":"imageworks","id":320618,"avatar_url":"https://avatars0.githubusercontent.com/u/320618?v=4","gravatar_id":"","url":"https://api.github.com/users/imageworks","html_url":"https://github.com/imageworks","followers_url":"https://api.github.com/users/imageworks/followers","following_url":"https://api.github.com/users/imageworks/following{/other_user}","gists_url":"https://api.github.com/users/imageworks/gists{/gist_id}","starred_url":"https://api.github.com/users/imageworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imageworks/subscriptions","organizations_url":"https://api.github.com/users/imageworks/orgs","repos_url":"https://api.github.com/users/imageworks/repos","events_url":"https://api.github.com/users/imageworks/events{/privacy}","received_events_url":"https://api.github.com/users/imageworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/imageworks/OpenShadingLanguage","description":"Advanced shading language for production GI renderers","fork":false,"url":"https://api.github.com/repos/imageworks/OpenShadingLanguage","forks_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/forks","keys_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/teams","hooks_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/hooks","issue_events_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/issues/events{/number}","events_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/events","assignees_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/assignees{/user}","branches_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/branches{/branch}","tags_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/tags","blobs_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/git/refs{/sha}","trees_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/statuses/{sha}","languages_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/languages","stargazers_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/stargazers","contributors_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/contributors","subscribers_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/subscribers","subscription_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/subscription","commits_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/commits{/sha}","git_commits_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/git/commits{/sha}","comments_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/comments{/number}","issue_comment_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/issues/comments{/number}","contents_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/contents/{+path}","compare_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/merges","archive_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/downloads","issues_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/issues{/number}","pulls_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls{/number}","milestones_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/milestones{/number}","notifications_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/labels{/name}","releases_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/releases{/id}","deployments_url":"https://api.github.com/repos/imageworks/OpenShadingLanguage/deployments","created_at":"2011-03-10T02:44:05Z","updated_at":"2018-02-01T17:58:25Z","pushed_at":"2018-02-02T15:18:24Z","git_url":"git://github.com/imageworks/OpenShadingLanguage.git","ssh_url":"git@github.com:imageworks/OpenShadingLanguage.git","clone_url":"https://github.com/imageworks/OpenShadingLanguage.git","svn_url":"https://github.com/imageworks/OpenShadingLanguage","homepage":"","size":155289,"stargazers_count":682,"watchers_count":682,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":176,"mirror_url":null,"archived":false,"open_issues_count":59,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":176,"open_issues":59,"watchers":682,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls/853"},"html":{"href":"https://github.com/imageworks/OpenShadingLanguage/pull/853"},"issue":{"href":"https://api.github.com/repos/imageworks/OpenShadingLanguage/issues/853"},"comments":{"href":"https://api.github.com/repos/imageworks/OpenShadingLanguage/issues/853/comments"},"review_comments":{"href":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls/853/comments"},"review_comment":{"href":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/imageworks/OpenShadingLanguage/pulls/853/commits"},"statuses":{"href":"https://api.github.com/repos/imageworks/OpenShadingLanguage/statuses/97574f5044ca3a66657b2e8c84a126e6bb6786b9"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":100,"deletions":26,"changed_files":8}}
{"actor":{"display_login":"marsupial"}}