{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/comments/192602105","pull_request_review_id":125407947,"id":192602105,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjYwMjEwNQ==","diff_hunk":"@@ -446,19 +446,28 @@ function constraint_macro(args, macro_name::Symbol, parsefun::Function)\n         $parsecode\n         $(refcall) = $constraintcall\n     end\n+\n     # Determine the return type of addconstraint. This is needed for JuMP extensions for which this is different than ConstraintRef\n     contype = :( constrainttype($m) )\n+    creationcode = getloopedcode(variable, code, condition, idxvars, idxsets, contype, requestedcontainer)\n+\n+    if anonvar\n+        # Anonymous constraint, no need to register it to a name\n+        # nor to assign it to a variable in the user scope.\n+        # We simply return the constraint reference\n+        assignmentcode = variable\n+    else\n+        # We register the constraint reference to its name and\n+        # we assign it to a variable of this name\n+        assignmentcode = quote\n+            registervar($m, $quotvarname, $variable)","path":"src/macros.jl","position":18,"original_position":18,"commit_id":"1347700e9aadb096d44467da8ef623d26161ccd1","original_commit_id":"1347700e9aadb096d44467da8ef623d26161ccd1","user":{"login":"mlubin","id":1733683,"node_id":"MDQ6VXNlcjE3MzM2ODM=","avatar_url":"https://avatars3.githubusercontent.com/u/1733683?v=4","gravatar_id":"","url":"https://api.github.com/users/mlubin","html_url":"https://github.com/mlubin","followers_url":"https://api.github.com/users/mlubin/followers","following_url":"https://api.github.com/users/mlubin/following{/other_user}","gists_url":"https://api.github.com/users/mlubin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubin/subscriptions","organizations_url":"https://api.github.com/users/mlubin/orgs","repos_url":"https://api.github.com/users/mlubin/repos","events_url":"https://api.github.com/users/mlubin/events{/privacy}","received_events_url":"https://api.github.com/users/mlubin/received_events","type":"User","site_admin":false},"body":"`registercon`?","created_at":"2018-06-03T20:55:28Z","updated_at":"2018-06-03T20:57:16Z","html_url":"https://github.com/JuliaOpt/JuMP.jl/pull/1318#discussion_r192602105","pull_request_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/1318","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/comments/192602105"},"html":{"href":"https://github.com/JuliaOpt/JuMP.jl/pull/1318#discussion_r192602105"},"pull_request":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/1318"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/1318","id":192266870,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMjY2ODcw","html_url":"https://github.com/JuliaOpt/JuMP.jl/pull/1318","diff_url":"https://github.com/JuliaOpt/JuMP.jl/pull/1318.diff","patch_url":"https://github.com/JuliaOpt/JuMP.jl/pull/1318.patch","issue_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/1318","number":1318,"state":"open","locked":false,"title":"Refactor return statement of constraint_macro","user":{"login":"blegat","id":1048205,"node_id":"MDQ6VXNlcjEwNDgyMDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1048205?v=4","gravatar_id":"","url":"https://api.github.com/users/blegat","html_url":"https://github.com/blegat","followers_url":"https://api.github.com/users/blegat/followers","following_url":"https://api.github.com/users/blegat/following{/other_user}","gists_url":"https://api.github.com/users/blegat/gists{/gist_id}","starred_url":"https://api.github.com/users/blegat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blegat/subscriptions","organizations_url":"https://api.github.com/users/blegat/orgs","repos_url":"https://api.github.com/users/blegat/repos","events_url":"https://api.github.com/users/blegat/events{/privacy}","received_events_url":"https://api.github.com/users/blegat/received_events","type":"User","site_admin":false},"body":"Mirror the change made in https://github.com/JuliaOpt/JuMP.jl/pull/1315/commits/365d4915cebf507a48d8e556b15c3e854434f71b for the `constraint_macro`","created_at":"2018-06-03T20:54:29Z","updated_at":"2018-06-03T20:57:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"016b01456fb2eebdb78ac0c066e96fba51443343","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/1318/commits","review_comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/1318/comments","review_comment_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/1318/comments","statuses_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/statuses/1347700e9aadb096d44467da8ef623d26161ccd1","head":{"label":"JuliaOpt:bl/conret","ref":"bl/conret","sha":"1347700e9aadb096d44467da8ef623d26161ccd1","user":{"login":"JuliaOpt","id":5667382,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NjczODI=","avatar_url":"https://avatars1.githubusercontent.com/u/5667382?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaOpt","html_url":"https://github.com/JuliaOpt","followers_url":"https://api.github.com/users/JuliaOpt/followers","following_url":"https://api.github.com/users/JuliaOpt/following{/other_user}","gists_url":"https://api.github.com/users/JuliaOpt/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaOpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaOpt/subscriptions","organizations_url":"https://api.github.com/users/JuliaOpt/orgs","repos_url":"https://api.github.com/users/JuliaOpt/repos","events_url":"https://api.github.com/users/JuliaOpt/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaOpt/received_events","type":"Organization","site_admin":false},"repo":{"id":6150069,"node_id":"MDEwOlJlcG9zaXRvcnk2MTUwMDY5","name":"JuMP.jl","full_name":"JuliaOpt/JuMP.jl","owner":{"login":"JuliaOpt","id":5667382,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NjczODI=","avatar_url":"https://avatars1.githubusercontent.com/u/5667382?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaOpt","html_url":"https://github.com/JuliaOpt","followers_url":"https://api.github.com/users/JuliaOpt/followers","following_url":"https://api.github.com/users/JuliaOpt/following{/other_user}","gists_url":"https://api.github.com/users/JuliaOpt/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaOpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaOpt/subscriptions","organizations_url":"https://api.github.com/users/JuliaOpt/orgs","repos_url":"https://api.github.com/users/JuliaOpt/repos","events_url":"https://api.github.com/users/JuliaOpt/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaOpt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaOpt/JuMP.jl","description":"Modeling language for Mathematical Optimization (linear, mixed-integer, conic, semidefinite, nonlinear)","fork":false,"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl","forks_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/forks","keys_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/teams","hooks_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/events","assignees_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/tags","blobs_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/subscription","commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/merges","archive_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/downloads","issues_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/deployments","created_at":"2012-10-10T00:34:45Z","updated_at":"2018-06-03T16:00:48Z","pushed_at":"2018-06-03T20:54:29Z","git_url":"git://github.com/JuliaOpt/JuMP.jl.git","ssh_url":"git@github.com:JuliaOpt/JuMP.jl.git","clone_url":"https://github.com/JuliaOpt/JuMP.jl.git","svn_url":"https://github.com/JuliaOpt/JuMP.jl","homepage":"","size":10491,"stargazers_count":491,"watchers_count":491,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":129,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":129,"open_issues":65,"watchers":491,"default_branch":"master"}},"base":{"label":"JuliaOpt:master","ref":"master","sha":"e392cc873fecea188d6d8d52c891924900eabd13","user":{"login":"JuliaOpt","id":5667382,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NjczODI=","avatar_url":"https://avatars1.githubusercontent.com/u/5667382?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaOpt","html_url":"https://github.com/JuliaOpt","followers_url":"https://api.github.com/users/JuliaOpt/followers","following_url":"https://api.github.com/users/JuliaOpt/following{/other_user}","gists_url":"https://api.github.com/users/JuliaOpt/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaOpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaOpt/subscriptions","organizations_url":"https://api.github.com/users/JuliaOpt/orgs","repos_url":"https://api.github.com/users/JuliaOpt/repos","events_url":"https://api.github.com/users/JuliaOpt/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaOpt/received_events","type":"Organization","site_admin":false},"repo":{"id":6150069,"node_id":"MDEwOlJlcG9zaXRvcnk2MTUwMDY5","name":"JuMP.jl","full_name":"JuliaOpt/JuMP.jl","owner":{"login":"JuliaOpt","id":5667382,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2NjczODI=","avatar_url":"https://avatars1.githubusercontent.com/u/5667382?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaOpt","html_url":"https://github.com/JuliaOpt","followers_url":"https://api.github.com/users/JuliaOpt/followers","following_url":"https://api.github.com/users/JuliaOpt/following{/other_user}","gists_url":"https://api.github.com/users/JuliaOpt/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaOpt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaOpt/subscriptions","organizations_url":"https://api.github.com/users/JuliaOpt/orgs","repos_url":"https://api.github.com/users/JuliaOpt/repos","events_url":"https://api.github.com/users/JuliaOpt/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaOpt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaOpt/JuMP.jl","description":"Modeling language for Mathematical Optimization (linear, mixed-integer, conic, semidefinite, nonlinear)","fork":false,"url":"https://api.github.com/repos/JuliaOpt/JuMP.jl","forks_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/forks","keys_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/teams","hooks_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/events","assignees_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/tags","blobs_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/subscription","commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/merges","archive_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/downloads","issues_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaOpt/JuMP.jl/deployments","created_at":"2012-10-10T00:34:45Z","updated_at":"2018-06-03T16:00:48Z","pushed_at":"2018-06-03T20:54:29Z","git_url":"git://github.com/JuliaOpt/JuMP.jl.git","ssh_url":"git@github.com:JuliaOpt/JuMP.jl.git","clone_url":"https://github.com/JuliaOpt/JuMP.jl.git","svn_url":"https://github.com/JuliaOpt/JuMP.jl","homepage":"","size":10491,"stargazers_count":491,"watchers_count":491,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":129,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":129,"open_issues":65,"watchers":491,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/1318"},"html":{"href":"https://github.com/JuliaOpt/JuMP.jl/pull/1318"},"issue":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/1318"},"comments":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/issues/1318/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/1318/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/pulls/1318/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaOpt/JuMP.jl/statuses/1347700e9aadb096d44467da8ef623d26161ccd1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mlubin"}}