{"action":"created","comment":{"url":"https://api.github.com/repos/mirah/mirah/pulls/comments/35771694","id":35771694,"diff_hunk":"@@ -477,14 +523,22 @@ class BetterClosureBuilder\n \n       \n \n-      parent = CallSite(block.parent)\n-      replace_block_with_closure_in_call parent, block, new_node\n+      if block.parent.kind_of?(CallSite)\n+        parent = CallSite(block.parent)\n+        replace_block_with_closure_in_call parent, block, new_node\n+      else","path":"src/org/mirah/typer/better_closures.mirah","position":251,"original_position":251,"commit_id":"368c66e9057f48a890a53a6b2c42e12e0afbe797","original_commit_id":"368c66e9057f48a890a53a6b2c42e12e0afbe797","user":{"login":"baroquebobcat","id":7378,"avatar_url":"https://avatars.githubusercontent.com/u/7378?v=3","gravatar_id":"","url":"https://api.github.com/users/baroquebobcat","html_url":"https://github.com/baroquebobcat","followers_url":"https://api.github.com/users/baroquebobcat/followers","following_url":"https://api.github.com/users/baroquebobcat/following{/other_user}","gists_url":"https://api.github.com/users/baroquebobcat/gists{/gist_id}","starred_url":"https://api.github.com/users/baroquebobcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baroquebobcat/subscriptions","organizations_url":"https://api.github.com/users/baroquebobcat/orgs","repos_url":"https://api.github.com/users/baroquebobcat/repos","events_url":"https://api.github.com/users/baroquebobcat/events{/privacy}","received_events_url":"https://api.github.com/users/baroquebobcat/received_events","type":"User","site_admin":false},"body":"I think I'd prefer if this was a elsif checking the type against SyntheticLambdaDefinition, with an else that raises an error.","created_at":"2015-07-29T15:17:57Z","updated_at":"2015-07-29T15:17:57Z","html_url":"https://github.com/mirah/mirah/pull/353#discussion_r35771694","pull_request_url":"https://api.github.com/repos/mirah/mirah/pulls/353","_links":{"self":{"href":"https://api.github.com/repos/mirah/mirah/pulls/comments/35771694"},"html":{"href":"https://github.com/mirah/mirah/pull/353#discussion_r35771694"},"pull_request":{"href":"https://api.github.com/repos/mirah/mirah/pulls/353"}}},"pull_request":{"url":"https://api.github.com/repos/mirah/mirah/pulls/353","id":41024449,"html_url":"https://github.com/mirah/mirah/pull/353","diff_url":"https://github.com/mirah/mirah/pull/353.diff","patch_url":"https://github.com/mirah/mirah/pull/353.patch","issue_url":"https://api.github.com/repos/mirah/mirah/issues/353","number":353,"state":"open","locked":false,"title":"Fix new closures code such that mirahc compiles, remove old closures implementation.","user":{"login":"felixvf","id":11700328,"avatar_url":"https://avatars.githubusercontent.com/u/11700328?v=3","gravatar_id":"","url":"https://api.github.com/users/felixvf","html_url":"https://github.com/felixvf","followers_url":"https://api.github.com/users/felixvf/followers","following_url":"https://api.github.com/users/felixvf/following{/other_user}","gists_url":"https://api.github.com/users/felixvf/gists{/gist_id}","starred_url":"https://api.github.com/users/felixvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixvf/subscriptions","organizations_url":"https://api.github.com/users/felixvf/orgs","repos_url":"https://api.github.com/users/felixvf/repos","events_url":"https://api.github.com/users/felixvf/events{/privacy}","received_events_url":"https://api.github.com/users/felixvf/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-28T15:25:50Z","updated_at":"2015-07-29T15:17:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2eb1b582d1a9ab9c9d31f57771767eb59ae65917","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mirah/mirah/pulls/353/commits","review_comments_url":"https://api.github.com/repos/mirah/mirah/pulls/353/comments","review_comment_url":"https://api.github.com/repos/mirah/mirah/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mirah/mirah/issues/353/comments","statuses_url":"https://api.github.com/repos/mirah/mirah/statuses/368c66e9057f48a890a53a6b2c42e12e0afbe797","head":{"label":"felixvf:feature_only_new_closures","ref":"feature_only_new_closures","sha":"368c66e9057f48a890a53a6b2c42e12e0afbe797","user":{"login":"felixvf","id":11700328,"avatar_url":"https://avatars.githubusercontent.com/u/11700328?v=3","gravatar_id":"","url":"https://api.github.com/users/felixvf","html_url":"https://github.com/felixvf","followers_url":"https://api.github.com/users/felixvf/followers","following_url":"https://api.github.com/users/felixvf/following{/other_user}","gists_url":"https://api.github.com/users/felixvf/gists{/gist_id}","starred_url":"https://api.github.com/users/felixvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixvf/subscriptions","organizations_url":"https://api.github.com/users/felixvf/orgs","repos_url":"https://api.github.com/users/felixvf/repos","events_url":"https://api.github.com/users/felixvf/events{/privacy}","received_events_url":"https://api.github.com/users/felixvf/received_events","type":"User","site_admin":false},"repo":{"id":33096770,"name":"mirah","full_name":"felixvf/mirah","owner":{"login":"felixvf","id":11700328,"avatar_url":"https://avatars.githubusercontent.com/u/11700328?v=3","gravatar_id":"","url":"https://api.github.com/users/felixvf","html_url":"https://github.com/felixvf","followers_url":"https://api.github.com/users/felixvf/followers","following_url":"https://api.github.com/users/felixvf/following{/other_user}","gists_url":"https://api.github.com/users/felixvf/gists{/gist_id}","starred_url":"https://api.github.com/users/felixvf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixvf/subscriptions","organizations_url":"https://api.github.com/users/felixvf/orgs","repos_url":"https://api.github.com/users/felixvf/repos","events_url":"https://api.github.com/users/felixvf/events{/privacy}","received_events_url":"https://api.github.com/users/felixvf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/felixvf/mirah","description":"The Mirah Programming Language","fork":true,"url":"https://api.github.com/repos/felixvf/mirah","forks_url":"https://api.github.com/repos/felixvf/mirah/forks","keys_url":"https://api.github.com/repos/felixvf/mirah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/felixvf/mirah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/felixvf/mirah/teams","hooks_url":"https://api.github.com/repos/felixvf/mirah/hooks","issue_events_url":"https://api.github.com/repos/felixvf/mirah/issues/events{/number}","events_url":"https://api.github.com/repos/felixvf/mirah/events","assignees_url":"https://api.github.com/repos/felixvf/mirah/assignees{/user}","branches_url":"https://api.github.com/repos/felixvf/mirah/branches{/branch}","tags_url":"https://api.github.com/repos/felixvf/mirah/tags","blobs_url":"https://api.github.com/repos/felixvf/mirah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/felixvf/mirah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/felixvf/mirah/git/refs{/sha}","trees_url":"https://api.github.com/repos/felixvf/mirah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/felixvf/mirah/statuses/{sha}","languages_url":"https://api.github.com/repos/felixvf/mirah/languages","stargazers_url":"https://api.github.com/repos/felixvf/mirah/stargazers","contributors_url":"https://api.github.com/repos/felixvf/mirah/contributors","subscribers_url":"https://api.github.com/repos/felixvf/mirah/subscribers","subscription_url":"https://api.github.com/repos/felixvf/mirah/subscription","commits_url":"https://api.github.com/repos/felixvf/mirah/commits{/sha}","git_commits_url":"https://api.github.com/repos/felixvf/mirah/git/commits{/sha}","comments_url":"https://api.github.com/repos/felixvf/mirah/comments{/number}","issue_comment_url":"https://api.github.com/repos/felixvf/mirah/issues/comments{/number}","contents_url":"https://api.github.com/repos/felixvf/mirah/contents/{+path}","compare_url":"https://api.github.com/repos/felixvf/mirah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/felixvf/mirah/merges","archive_url":"https://api.github.com/repos/felixvf/mirah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/felixvf/mirah/downloads","issues_url":"https://api.github.com/repos/felixvf/mirah/issues{/number}","pulls_url":"https://api.github.com/repos/felixvf/mirah/pulls{/number}","milestones_url":"https://api.github.com/repos/felixvf/mirah/milestones{/number}","notifications_url":"https://api.github.com/repos/felixvf/mirah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/felixvf/mirah/labels{/name}","releases_url":"https://api.github.com/repos/felixvf/mirah/releases{/id}","created_at":"2015-03-30T01:23:24Z","updated_at":"2015-04-28T13:22:57Z","pushed_at":"2015-07-28T22:30:35Z","git_url":"git://github.com/felixvf/mirah.git","ssh_url":"git@github.com:felixvf/mirah.git","clone_url":"https://github.com/felixvf/mirah.git","svn_url":"https://github.com/felixvf/mirah","homepage":"http://mirah.org","size":52317,"stargazers_count":0,"watchers_count":0,"language":"Mirah","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mirah:master","ref":"master","sha":"816a925189e67ea623a1b45b8152b7696e55c0d1","user":{"login":"mirah","id":325689,"avatar_url":"https://avatars.githubusercontent.com/u/325689?v=3","gravatar_id":"","url":"https://api.github.com/users/mirah","html_url":"https://github.com/mirah","followers_url":"https://api.github.com/users/mirah/followers","following_url":"https://api.github.com/users/mirah/following{/other_user}","gists_url":"https://api.github.com/users/mirah/gists{/gist_id}","starred_url":"https://api.github.com/users/mirah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirah/subscriptions","organizations_url":"https://api.github.com/users/mirah/orgs","repos_url":"https://api.github.com/users/mirah/repos","events_url":"https://api.github.com/users/mirah/events{/privacy}","received_events_url":"https://api.github.com/users/mirah/received_events","type":"Organization","site_admin":false},"repo":{"id":832272,"name":"mirah","full_name":"mirah/mirah","owner":{"login":"mirah","id":325689,"avatar_url":"https://avatars.githubusercontent.com/u/325689?v=3","gravatar_id":"","url":"https://api.github.com/users/mirah","html_url":"https://github.com/mirah","followers_url":"https://api.github.com/users/mirah/followers","following_url":"https://api.github.com/users/mirah/following{/other_user}","gists_url":"https://api.github.com/users/mirah/gists{/gist_id}","starred_url":"https://api.github.com/users/mirah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirah/subscriptions","organizations_url":"https://api.github.com/users/mirah/orgs","repos_url":"https://api.github.com/users/mirah/repos","events_url":"https://api.github.com/users/mirah/events{/privacy}","received_events_url":"https://api.github.com/users/mirah/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mirah/mirah","description":"The Mirah Programming Language","fork":false,"url":"https://api.github.com/repos/mirah/mirah","forks_url":"https://api.github.com/repos/mirah/mirah/forks","keys_url":"https://api.github.com/repos/mirah/mirah/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mirah/mirah/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mirah/mirah/teams","hooks_url":"https://api.github.com/repos/mirah/mirah/hooks","issue_events_url":"https://api.github.com/repos/mirah/mirah/issues/events{/number}","events_url":"https://api.github.com/repos/mirah/mirah/events","assignees_url":"https://api.github.com/repos/mirah/mirah/assignees{/user}","branches_url":"https://api.github.com/repos/mirah/mirah/branches{/branch}","tags_url":"https://api.github.com/repos/mirah/mirah/tags","blobs_url":"https://api.github.com/repos/mirah/mirah/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mirah/mirah/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mirah/mirah/git/refs{/sha}","trees_url":"https://api.github.com/repos/mirah/mirah/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mirah/mirah/statuses/{sha}","languages_url":"https://api.github.com/repos/mirah/mirah/languages","stargazers_url":"https://api.github.com/repos/mirah/mirah/stargazers","contributors_url":"https://api.github.com/repos/mirah/mirah/contributors","subscribers_url":"https://api.github.com/repos/mirah/mirah/subscribers","subscription_url":"https://api.github.com/repos/mirah/mirah/subscription","commits_url":"https://api.github.com/repos/mirah/mirah/commits{/sha}","git_commits_url":"https://api.github.com/repos/mirah/mirah/git/commits{/sha}","comments_url":"https://api.github.com/repos/mirah/mirah/comments{/number}","issue_comment_url":"https://api.github.com/repos/mirah/mirah/issues/comments{/number}","contents_url":"https://api.github.com/repos/mirah/mirah/contents/{+path}","compare_url":"https://api.github.com/repos/mirah/mirah/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mirah/mirah/merges","archive_url":"https://api.github.com/repos/mirah/mirah/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mirah/mirah/downloads","issues_url":"https://api.github.com/repos/mirah/mirah/issues{/number}","pulls_url":"https://api.github.com/repos/mirah/mirah/pulls{/number}","milestones_url":"https://api.github.com/repos/mirah/mirah/milestones{/number}","notifications_url":"https://api.github.com/repos/mirah/mirah/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mirah/mirah/labels{/name}","releases_url":"https://api.github.com/repos/mirah/mirah/releases{/id}","created_at":"2010-08-11T22:44:13Z","updated_at":"2015-07-26T07:33:28Z","pushed_at":"2015-07-29T04:46:09Z","git_url":"git://github.com/mirah/mirah.git","ssh_url":"git@github.com:mirah/mirah.git","clone_url":"https://github.com/mirah/mirah.git","svn_url":"https://github.com/mirah/mirah","homepage":"http://mirah.org","size":55534,"stargazers_count":760,"watchers_count":760,"language":"Mirah","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":104,"forks":65,"open_issues":104,"watchers":760,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mirah/mirah/pulls/353"},"html":{"href":"https://github.com/mirah/mirah/pull/353"},"issue":{"href":"https://api.github.com/repos/mirah/mirah/issues/353"},"comments":{"href":"https://api.github.com/repos/mirah/mirah/issues/353/comments"},"review_comments":{"href":"https://api.github.com/repos/mirah/mirah/pulls/353/comments"},"review_comment":{"href":"https://api.github.com/repos/mirah/mirah/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mirah/mirah/pulls/353/commits"},"statuses":{"href":"https://api.github.com/repos/mirah/mirah/statuses/368c66e9057f48a890a53a6b2c42e12e0afbe797"}}}}