{"action":"opened","number":6,"pull_request":{"url":"https://api.github.com/repos/richard-roberts/SOMns/pulls/6","id":168738203,"html_url":"https://github.com/richard-roberts/SOMns/pull/6","diff_url":"https://github.com/richard-roberts/SOMns/pull/6.diff","patch_url":"https://github.com/richard-roberts/SOMns/pull/6.patch","issue_url":"https://api.github.com/repos/richard-roberts/SOMns/issues/6","number":6,"state":"open","locked":false,"title":"Enable inherit expressions with >0 arity ","user":{"login":"richard-roberts","id":14899134,"avatar_url":"https://avatars3.githubusercontent.com/u/14899134?v=4","gravatar_id":"","url":"https://api.github.com/users/richard-roberts","html_url":"https://github.com/richard-roberts","followers_url":"https://api.github.com/users/richard-roberts/followers","following_url":"https://api.github.com/users/richard-roberts/following{/other_user}","gists_url":"https://api.github.com/users/richard-roberts/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-roberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-roberts/subscriptions","organizations_url":"https://api.github.com/users/richard-roberts/orgs","repos_url":"https://api.github.com/users/richard-roberts/repos","events_url":"https://api.github.com/users/richard-roberts/events{/privacy}","received_events_url":"https://api.github.com/users/richard-roberts/received_events","type":"User","site_admin":false},"body":"Grace's inheritance expressions can contain arguments, which are evaluated in the same way as any other expression. For example, the inheritance expression `inherit A(b)` states that the current class or object should inherit from `A` with the value of `b` applied, in which `b` is a normal implicit request. \r\n\r\nWhen resolving inheritance expressions, SOMns uses a \"superclass resolution method\" (an [anonymous method added to the enclosing object](https://github.com/richard-roberts/SOMns/blob/master/src/som/compiler/MixinBuilder.java#L483)). This is problematic for Grace, because Grace enables classes and objects to be nested inside of methods,  whereas Newspeak does not. So, while losing access to the lexical scope surrounding an inheritance expression is suitable for Newspeak, it causes a problem for Grace when arguments of the inheritance expression refer to something bound in the current lexical scope.\r\n\r\nTo avoid reimplementing a sizeable portion of SOMns's code for resolving inheritance - that would be the right thing to do though, where it might be best to use a closure of the current lexical scope for the superclass resolution method (see richard-roberts/Moth#2) - I have replaced any implicit requests with a local argument read of the resolution method. \r\n\r\nThe changes here enable any implicit sends used in an inheritance expression to be replaced by a local argument read to the superclass resolution method. Note that, to support this, we also need to append those arguments to the superclass resolution method itself. As an analogy - the changes move arguments from away from the inheritance expression and into the superclass resolution method itself.\r\n\r\nI've also made two further changes that stabilize our support for inheritance: a temporary fix for finding the lexical class of an outer object matching a given mixin identification (used to find the correct class of an outer whose superclass implements a requested method), and I've also removed an assertion that was thrown when aliasing was used (since this causes two methods to appear with the same name).","created_at":"2018-02-13T02:18:24Z","updated_at":"2018-02-13T02:18:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/richard-roberts/SOMns/pulls/6/commits","review_comments_url":"https://api.github.com/repos/richard-roberts/SOMns/pulls/6/comments","review_comment_url":"https://api.github.com/repos/richard-roberts/SOMns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/richard-roberts/SOMns/issues/6/comments","statuses_url":"https://api.github.com/repos/richard-roberts/SOMns/statuses/fe8d7be4edf1d553e56b085c750eb75c0d495b55","head":{"label":"richard-roberts:dev","ref":"dev","sha":"fe8d7be4edf1d553e56b085c750eb75c0d495b55","user":{"login":"richard-roberts","id":14899134,"avatar_url":"https://avatars3.githubusercontent.com/u/14899134?v=4","gravatar_id":"","url":"https://api.github.com/users/richard-roberts","html_url":"https://github.com/richard-roberts","followers_url":"https://api.github.com/users/richard-roberts/followers","following_url":"https://api.github.com/users/richard-roberts/following{/other_user}","gists_url":"https://api.github.com/users/richard-roberts/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-roberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-roberts/subscriptions","organizations_url":"https://api.github.com/users/richard-roberts/orgs","repos_url":"https://api.github.com/users/richard-roberts/repos","events_url":"https://api.github.com/users/richard-roberts/events{/privacy}","received_events_url":"https://api.github.com/users/richard-roberts/received_events","type":"User","site_admin":false},"repo":{"id":112544532,"name":"SOMns","full_name":"richard-roberts/SOMns","owner":{"login":"richard-roberts","id":14899134,"avatar_url":"https://avatars3.githubusercontent.com/u/14899134?v=4","gravatar_id":"","url":"https://api.github.com/users/richard-roberts","html_url":"https://github.com/richard-roberts","followers_url":"https://api.github.com/users/richard-roberts/followers","following_url":"https://api.github.com/users/richard-roberts/following{/other_user}","gists_url":"https://api.github.com/users/richard-roberts/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-roberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-roberts/subscriptions","organizations_url":"https://api.github.com/users/richard-roberts/orgs","repos_url":"https://api.github.com/users/richard-roberts/repos","events_url":"https://api.github.com/users/richard-roberts/events{/privacy}","received_events_url":"https://api.github.com/users/richard-roberts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/richard-roberts/SOMns","description":"SOMns: A Newspeak for Concurrency Research","fork":true,"url":"https://api.github.com/repos/richard-roberts/SOMns","forks_url":"https://api.github.com/repos/richard-roberts/SOMns/forks","keys_url":"https://api.github.com/repos/richard-roberts/SOMns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/richard-roberts/SOMns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/richard-roberts/SOMns/teams","hooks_url":"https://api.github.com/repos/richard-roberts/SOMns/hooks","issue_events_url":"https://api.github.com/repos/richard-roberts/SOMns/issues/events{/number}","events_url":"https://api.github.com/repos/richard-roberts/SOMns/events","assignees_url":"https://api.github.com/repos/richard-roberts/SOMns/assignees{/user}","branches_url":"https://api.github.com/repos/richard-roberts/SOMns/branches{/branch}","tags_url":"https://api.github.com/repos/richard-roberts/SOMns/tags","blobs_url":"https://api.github.com/repos/richard-roberts/SOMns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/richard-roberts/SOMns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/richard-roberts/SOMns/git/refs{/sha}","trees_url":"https://api.github.com/repos/richard-roberts/SOMns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/richard-roberts/SOMns/statuses/{sha}","languages_url":"https://api.github.com/repos/richard-roberts/SOMns/languages","stargazers_url":"https://api.github.com/repos/richard-roberts/SOMns/stargazers","contributors_url":"https://api.github.com/repos/richard-roberts/SOMns/contributors","subscribers_url":"https://api.github.com/repos/richard-roberts/SOMns/subscribers","subscription_url":"https://api.github.com/repos/richard-roberts/SOMns/subscription","commits_url":"https://api.github.com/repos/richard-roberts/SOMns/commits{/sha}","git_commits_url":"https://api.github.com/repos/richard-roberts/SOMns/git/commits{/sha}","comments_url":"https://api.github.com/repos/richard-roberts/SOMns/comments{/number}","issue_comment_url":"https://api.github.com/repos/richard-roberts/SOMns/issues/comments{/number}","contents_url":"https://api.github.com/repos/richard-roberts/SOMns/contents/{+path}","compare_url":"https://api.github.com/repos/richard-roberts/SOMns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/richard-roberts/SOMns/merges","archive_url":"https://api.github.com/repos/richard-roberts/SOMns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/richard-roberts/SOMns/downloads","issues_url":"https://api.github.com/repos/richard-roberts/SOMns/issues{/number}","pulls_url":"https://api.github.com/repos/richard-roberts/SOMns/pulls{/number}","milestones_url":"https://api.github.com/repos/richard-roberts/SOMns/milestones{/number}","notifications_url":"https://api.github.com/repos/richard-roberts/SOMns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/richard-roberts/SOMns/labels{/name}","releases_url":"https://api.github.com/repos/richard-roberts/SOMns/releases{/id}","deployments_url":"https://api.github.com/repos/richard-roberts/SOMns/deployments","created_at":"2017-11-30T00:39:24Z","updated_at":"2018-01-12T01:53:43Z","pushed_at":"2018-02-13T01:45:49Z","git_url":"git://github.com/richard-roberts/SOMns.git","ssh_url":"git@github.com:richard-roberts/SOMns.git","clone_url":"https://github.com/richard-roberts/SOMns.git","svn_url":"https://github.com/richard-roberts/SOMns","homepage":"","size":10530,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"richard-roberts:master","ref":"master","sha":"f9be3d63e4cf83bac76480ce7af40b387f5eaff7","user":{"login":"richard-roberts","id":14899134,"avatar_url":"https://avatars3.githubusercontent.com/u/14899134?v=4","gravatar_id":"","url":"https://api.github.com/users/richard-roberts","html_url":"https://github.com/richard-roberts","followers_url":"https://api.github.com/users/richard-roberts/followers","following_url":"https://api.github.com/users/richard-roberts/following{/other_user}","gists_url":"https://api.github.com/users/richard-roberts/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-roberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-roberts/subscriptions","organizations_url":"https://api.github.com/users/richard-roberts/orgs","repos_url":"https://api.github.com/users/richard-roberts/repos","events_url":"https://api.github.com/users/richard-roberts/events{/privacy}","received_events_url":"https://api.github.com/users/richard-roberts/received_events","type":"User","site_admin":false},"repo":{"id":112544532,"name":"SOMns","full_name":"richard-roberts/SOMns","owner":{"login":"richard-roberts","id":14899134,"avatar_url":"https://avatars3.githubusercontent.com/u/14899134?v=4","gravatar_id":"","url":"https://api.github.com/users/richard-roberts","html_url":"https://github.com/richard-roberts","followers_url":"https://api.github.com/users/richard-roberts/followers","following_url":"https://api.github.com/users/richard-roberts/following{/other_user}","gists_url":"https://api.github.com/users/richard-roberts/gists{/gist_id}","starred_url":"https://api.github.com/users/richard-roberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richard-roberts/subscriptions","organizations_url":"https://api.github.com/users/richard-roberts/orgs","repos_url":"https://api.github.com/users/richard-roberts/repos","events_url":"https://api.github.com/users/richard-roberts/events{/privacy}","received_events_url":"https://api.github.com/users/richard-roberts/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/richard-roberts/SOMns","description":"SOMns: A Newspeak for Concurrency Research","fork":true,"url":"https://api.github.com/repos/richard-roberts/SOMns","forks_url":"https://api.github.com/repos/richard-roberts/SOMns/forks","keys_url":"https://api.github.com/repos/richard-roberts/SOMns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/richard-roberts/SOMns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/richard-roberts/SOMns/teams","hooks_url":"https://api.github.com/repos/richard-roberts/SOMns/hooks","issue_events_url":"https://api.github.com/repos/richard-roberts/SOMns/issues/events{/number}","events_url":"https://api.github.com/repos/richard-roberts/SOMns/events","assignees_url":"https://api.github.com/repos/richard-roberts/SOMns/assignees{/user}","branches_url":"https://api.github.com/repos/richard-roberts/SOMns/branches{/branch}","tags_url":"https://api.github.com/repos/richard-roberts/SOMns/tags","blobs_url":"https://api.github.com/repos/richard-roberts/SOMns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/richard-roberts/SOMns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/richard-roberts/SOMns/git/refs{/sha}","trees_url":"https://api.github.com/repos/richard-roberts/SOMns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/richard-roberts/SOMns/statuses/{sha}","languages_url":"https://api.github.com/repos/richard-roberts/SOMns/languages","stargazers_url":"https://api.github.com/repos/richard-roberts/SOMns/stargazers","contributors_url":"https://api.github.com/repos/richard-roberts/SOMns/contributors","subscribers_url":"https://api.github.com/repos/richard-roberts/SOMns/subscribers","subscription_url":"https://api.github.com/repos/richard-roberts/SOMns/subscription","commits_url":"https://api.github.com/repos/richard-roberts/SOMns/commits{/sha}","git_commits_url":"https://api.github.com/repos/richard-roberts/SOMns/git/commits{/sha}","comments_url":"https://api.github.com/repos/richard-roberts/SOMns/comments{/number}","issue_comment_url":"https://api.github.com/repos/richard-roberts/SOMns/issues/comments{/number}","contents_url":"https://api.github.com/repos/richard-roberts/SOMns/contents/{+path}","compare_url":"https://api.github.com/repos/richard-roberts/SOMns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/richard-roberts/SOMns/merges","archive_url":"https://api.github.com/repos/richard-roberts/SOMns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/richard-roberts/SOMns/downloads","issues_url":"https://api.github.com/repos/richard-roberts/SOMns/issues{/number}","pulls_url":"https://api.github.com/repos/richard-roberts/SOMns/pulls{/number}","milestones_url":"https://api.github.com/repos/richard-roberts/SOMns/milestones{/number}","notifications_url":"https://api.github.com/repos/richard-roberts/SOMns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/richard-roberts/SOMns/labels{/name}","releases_url":"https://api.github.com/repos/richard-roberts/SOMns/releases{/id}","deployments_url":"https://api.github.com/repos/richard-roberts/SOMns/deployments","created_at":"2017-11-30T00:39:24Z","updated_at":"2018-01-12T01:53:43Z","pushed_at":"2018-02-13T01:45:49Z","git_url":"git://github.com/richard-roberts/SOMns.git","ssh_url":"git@github.com:richard-roberts/SOMns.git","clone_url":"https://github.com/richard-roberts/SOMns.git","svn_url":"https://github.com/richard-roberts/SOMns","homepage":"","size":10530,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/richard-roberts/SOMns/pulls/6"},"html":{"href":"https://github.com/richard-roberts/SOMns/pull/6"},"issue":{"href":"https://api.github.com/repos/richard-roberts/SOMns/issues/6"},"comments":{"href":"https://api.github.com/repos/richard-roberts/SOMns/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/richard-roberts/SOMns/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/richard-roberts/SOMns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/richard-roberts/SOMns/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/richard-roberts/SOMns/statuses/fe8d7be4edf1d553e56b085c750eb75c0d495b55"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":3,"additions":62,"deletions":13,"changed_files":5}}
{"actor":{"display_login":"richard-roberts"}}