{"action":"created","comment":{"url":"https://api.github.com/repos/typetools/checker-framework/pulls/comments/92933476","pull_request_review_id":13457116,"id":92933476,"diff_hunk":"@@ -120,18 +176,47 @@ public void stringCastTest() {\n \n     void tooManyValuesInt() {\n         //:: warning: (too.many.values.given)\n-        @IntVal({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}) int a = 8;\n+        @IntVal({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 100}) int a = 8;\n \n         @UnknownVal int b = a; // This should always succeed\n \n-        @UnknownVal int c = 0;\n+        @UnknownVal int c = 20;\n \n-        a = c; // This should succeed if a is treated as @UnknownVal\n+        a = c; // This should succeed if a is treated as @IntRange(from=1, to=100)\n \n         //:: warning: (too.many.values.given)\n-        @IntVal({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}) int d = 8;\n+        @IntVal({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12})\n+        //:: error: (assignment.type.incompatible)\n+        int d = a; // d is @IntRange(from=1, to=12), a is @IntVal({20});\n+    }\n+\n+    void tooNarrowIntRange(\n+            //:: warning: (too.narrow.int.range)\n+            @IntRange(from = 1, to = 4) int a) {\n+\n+        @IntVal({2, 4, 6, 8}) int b;\n+\n+        b = a * 2; // should be succeed if a is treated as @IntVal({1, 2, 3, 4})\n+\n+        //:: warning: (too.narrow.int.range)\n+        @IntRange(from = 3, to = 8)\n+        int c;\n+\n+        //:: error: (assignment.type.incompatible)\n+        c = a * 2; // should not be succeed\n+\n+        //:: warning: (too.narrow.int.range)\n+        @IntRange(from = 2, to = 2)\n+        int d = 2;\n+        b = d * 2; // should be succeed if d is treated as @IntVal({2});\n+    }\n+\n+    void fromGreaterThanTo() {\n+        //:: warning: (from.greater.than.to)\n+        @IntRange(from = 2, to = 0)\n+        int a;\n \n-        d = 2 * d; // This should succeed since d is @UnknownVal\n+        a = 3; //should be succeed if a is treated as @UnknownVal","path":"framework/tests/value/Basics.java","position":134,"original_position":134,"commit_id":"8cd0b6fb5937ace415309a00bb0292cdff3df28a","original_commit_id":"8cd0b6fb5937ace415309a00bb0292cdff3df28a","user":{"login":"mernst","id":121025,"avatar_url":"https://avatars.githubusercontent.com/u/121025?v=3","gravatar_id":"","url":"https://api.github.com/users/mernst","html_url":"https://github.com/mernst","followers_url":"https://api.github.com/users/mernst/followers","following_url":"https://api.github.com/users/mernst/following{/other_user}","gists_url":"https://api.github.com/users/mernst/gists{/gist_id}","starred_url":"https://api.github.com/users/mernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mernst/subscriptions","organizations_url":"https://api.github.com/users/mernst/orgs","repos_url":"https://api.github.com/users/mernst/repos","events_url":"https://api.github.com/users/mernst/events{/privacy}","received_events_url":"https://api.github.com/users/mernst/received_events","type":"User","site_admin":false},"body":"Ungrammatical.","created_at":"2016-12-18T03:59:03Z","updated_at":"2016-12-18T03:59:18Z","html_url":"https://github.com/typetools/checker-framework/pull/994#discussion_r92933476","pull_request_url":"https://api.github.com/repos/typetools/checker-framework/pulls/994","_links":{"self":{"href":"https://api.github.com/repos/typetools/checker-framework/pulls/comments/92933476"},"html":{"href":"https://github.com/typetools/checker-framework/pull/994#discussion_r92933476"},"pull_request":{"href":"https://api.github.com/repos/typetools/checker-framework/pulls/994"}}},"pull_request":{"url":"https://api.github.com/repos/typetools/checker-framework/pulls/994","id":98091574,"html_url":"https://github.com/typetools/checker-framework/pull/994","diff_url":"https://github.com/typetools/checker-framework/pull/994.diff","patch_url":"https://github.com/typetools/checker-framework/pull/994.patch","issue_url":"https://api.github.com/repos/typetools/checker-framework/issues/994","number":994,"state":"open","locked":false,"title":"Integrate @IntRange annotation with ValueChecker","user":{"login":"JasonMrX","id":13440746,"avatar_url":"https://avatars.githubusercontent.com/u/13440746?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonMrX","html_url":"https://github.com/JasonMrX","followers_url":"https://api.github.com/users/JasonMrX/followers","following_url":"https://api.github.com/users/JasonMrX/following{/other_user}","gists_url":"https://api.github.com/users/JasonMrX/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonMrX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonMrX/subscriptions","organizations_url":"https://api.github.com/users/JasonMrX/orgs","repos_url":"https://api.github.com/users/JasonMrX/repos","events_url":"https://api.github.com/users/JasonMrX/events{/privacy}","received_events_url":"https://api.github.com/users/JasonMrX/received_events","type":"User","site_admin":false},"body":"Hello Professor @wmdietl,\r\n\r\nWould you kindly review this PR. \r\n\r\nThanks and regards,\r\n\r\nJason","created_at":"2016-12-15T05:59:01Z","updated_at":"2016-12-18T03:59:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c9aebdd198927957e82c81f726b0592b22c4e8c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/typetools/checker-framework/pulls/994/commits","review_comments_url":"https://api.github.com/repos/typetools/checker-framework/pulls/994/comments","review_comment_url":"https://api.github.com/repos/typetools/checker-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/typetools/checker-framework/issues/994/comments","statuses_url":"https://api.github.com/repos/typetools/checker-framework/statuses/8cd0b6fb5937ace415309a00bb0292cdff3df28a","head":{"label":"JasonMrX:master","ref":"master","sha":"8cd0b6fb5937ace415309a00bb0292cdff3df28a","user":{"login":"JasonMrX","id":13440746,"avatar_url":"https://avatars.githubusercontent.com/u/13440746?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonMrX","html_url":"https://github.com/JasonMrX","followers_url":"https://api.github.com/users/JasonMrX/followers","following_url":"https://api.github.com/users/JasonMrX/following{/other_user}","gists_url":"https://api.github.com/users/JasonMrX/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonMrX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonMrX/subscriptions","organizations_url":"https://api.github.com/users/JasonMrX/orgs","repos_url":"https://api.github.com/users/JasonMrX/repos","events_url":"https://api.github.com/users/JasonMrX/events{/privacy}","received_events_url":"https://api.github.com/users/JasonMrX/received_events","type":"User","site_admin":false},"repo":{"id":70971444,"name":"checker-framework","full_name":"JasonMrX/checker-framework","owner":{"login":"JasonMrX","id":13440746,"avatar_url":"https://avatars.githubusercontent.com/u/13440746?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonMrX","html_url":"https://github.com/JasonMrX","followers_url":"https://api.github.com/users/JasonMrX/followers","following_url":"https://api.github.com/users/JasonMrX/following{/other_user}","gists_url":"https://api.github.com/users/JasonMrX/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonMrX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonMrX/subscriptions","organizations_url":"https://api.github.com/users/JasonMrX/orgs","repos_url":"https://api.github.com/users/JasonMrX/repos","events_url":"https://api.github.com/users/JasonMrX/events{/privacy}","received_events_url":"https://api.github.com/users/JasonMrX/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JasonMrX/checker-framework","description":"Pluggable type-checking for Java","fork":true,"url":"https://api.github.com/repos/JasonMrX/checker-framework","forks_url":"https://api.github.com/repos/JasonMrX/checker-framework/forks","keys_url":"https://api.github.com/repos/JasonMrX/checker-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JasonMrX/checker-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JasonMrX/checker-framework/teams","hooks_url":"https://api.github.com/repos/JasonMrX/checker-framework/hooks","issue_events_url":"https://api.github.com/repos/JasonMrX/checker-framework/issues/events{/number}","events_url":"https://api.github.com/repos/JasonMrX/checker-framework/events","assignees_url":"https://api.github.com/repos/JasonMrX/checker-framework/assignees{/user}","branches_url":"https://api.github.com/repos/JasonMrX/checker-framework/branches{/branch}","tags_url":"https://api.github.com/repos/JasonMrX/checker-framework/tags","blobs_url":"https://api.github.com/repos/JasonMrX/checker-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JasonMrX/checker-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JasonMrX/checker-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/JasonMrX/checker-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JasonMrX/checker-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/JasonMrX/checker-framework/languages","stargazers_url":"https://api.github.com/repos/JasonMrX/checker-framework/stargazers","contributors_url":"https://api.github.com/repos/JasonMrX/checker-framework/contributors","subscribers_url":"https://api.github.com/repos/JasonMrX/checker-framework/subscribers","subscription_url":"https://api.github.com/repos/JasonMrX/checker-framework/subscription","commits_url":"https://api.github.com/repos/JasonMrX/checker-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/JasonMrX/checker-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/JasonMrX/checker-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/JasonMrX/checker-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/JasonMrX/checker-framework/contents/{+path}","compare_url":"https://api.github.com/repos/JasonMrX/checker-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JasonMrX/checker-framework/merges","archive_url":"https://api.github.com/repos/JasonMrX/checker-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JasonMrX/checker-framework/downloads","issues_url":"https://api.github.com/repos/JasonMrX/checker-framework/issues{/number}","pulls_url":"https://api.github.com/repos/JasonMrX/checker-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/JasonMrX/checker-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/JasonMrX/checker-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JasonMrX/checker-framework/labels{/name}","releases_url":"https://api.github.com/repos/JasonMrX/checker-framework/releases{/id}","deployments_url":"https://api.github.com/repos/JasonMrX/checker-framework/deployments","created_at":"2016-10-15T06:41:17Z","updated_at":"2016-10-15T06:41:23Z","pushed_at":"2016-12-18T03:29:16Z","git_url":"git://github.com/JasonMrX/checker-framework.git","ssh_url":"git@github.com:JasonMrX/checker-framework.git","clone_url":"https://github.com/JasonMrX/checker-framework.git","svn_url":"https://github.com/JasonMrX/checker-framework","homepage":"http://checkerframework.org/","size":193712,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"typetools:master","ref":"master","sha":"cbaa74e04ceb12149c8a19486736f427b742840a","user":{"login":"typetools","id":12883499,"avatar_url":"https://avatars.githubusercontent.com/u/12883499?v=3","gravatar_id":"","url":"https://api.github.com/users/typetools","html_url":"https://github.com/typetools","followers_url":"https://api.github.com/users/typetools/followers","following_url":"https://api.github.com/users/typetools/following{/other_user}","gists_url":"https://api.github.com/users/typetools/gists{/gist_id}","starred_url":"https://api.github.com/users/typetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typetools/subscriptions","organizations_url":"https://api.github.com/users/typetools/orgs","repos_url":"https://api.github.com/users/typetools/repos","events_url":"https://api.github.com/users/typetools/events{/privacy}","received_events_url":"https://api.github.com/users/typetools/received_events","type":"Organization","site_admin":false},"repo":{"id":38488726,"name":"checker-framework","full_name":"typetools/checker-framework","owner":{"login":"typetools","id":12883499,"avatar_url":"https://avatars.githubusercontent.com/u/12883499?v=3","gravatar_id":"","url":"https://api.github.com/users/typetools","html_url":"https://github.com/typetools","followers_url":"https://api.github.com/users/typetools/followers","following_url":"https://api.github.com/users/typetools/following{/other_user}","gists_url":"https://api.github.com/users/typetools/gists{/gist_id}","starred_url":"https://api.github.com/users/typetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typetools/subscriptions","organizations_url":"https://api.github.com/users/typetools/orgs","repos_url":"https://api.github.com/users/typetools/repos","events_url":"https://api.github.com/users/typetools/events{/privacy}","received_events_url":"https://api.github.com/users/typetools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/typetools/checker-framework","description":"Pluggable type-checking for Java","fork":false,"url":"https://api.github.com/repos/typetools/checker-framework","forks_url":"https://api.github.com/repos/typetools/checker-framework/forks","keys_url":"https://api.github.com/repos/typetools/checker-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/typetools/checker-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/typetools/checker-framework/teams","hooks_url":"https://api.github.com/repos/typetools/checker-framework/hooks","issue_events_url":"https://api.github.com/repos/typetools/checker-framework/issues/events{/number}","events_url":"https://api.github.com/repos/typetools/checker-framework/events","assignees_url":"https://api.github.com/repos/typetools/checker-framework/assignees{/user}","branches_url":"https://api.github.com/repos/typetools/checker-framework/branches{/branch}","tags_url":"https://api.github.com/repos/typetools/checker-framework/tags","blobs_url":"https://api.github.com/repos/typetools/checker-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/typetools/checker-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/typetools/checker-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/typetools/checker-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/typetools/checker-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/typetools/checker-framework/languages","stargazers_url":"https://api.github.com/repos/typetools/checker-framework/stargazers","contributors_url":"https://api.github.com/repos/typetools/checker-framework/contributors","subscribers_url":"https://api.github.com/repos/typetools/checker-framework/subscribers","subscription_url":"https://api.github.com/repos/typetools/checker-framework/subscription","commits_url":"https://api.github.com/repos/typetools/checker-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/typetools/checker-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/typetools/checker-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/typetools/checker-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/typetools/checker-framework/contents/{+path}","compare_url":"https://api.github.com/repos/typetools/checker-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/typetools/checker-framework/merges","archive_url":"https://api.github.com/repos/typetools/checker-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/typetools/checker-framework/downloads","issues_url":"https://api.github.com/repos/typetools/checker-framework/issues{/number}","pulls_url":"https://api.github.com/repos/typetools/checker-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/typetools/checker-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/typetools/checker-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/typetools/checker-framework/labels{/name}","releases_url":"https://api.github.com/repos/typetools/checker-framework/releases{/id}","deployments_url":"https://api.github.com/repos/typetools/checker-framework/deployments","created_at":"2015-07-03T11:09:17Z","updated_at":"2016-12-13T23:16:20Z","pushed_at":"2016-12-18T03:29:16Z","git_url":"git://github.com/typetools/checker-framework.git","ssh_url":"git@github.com:typetools/checker-framework.git","clone_url":"https://github.com/typetools/checker-framework.git","svn_url":"https://github.com/typetools/checker-framework","homepage":"http://checkerframework.org/","size":195475,"stargazers_count":168,"watchers_count":168,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":174,"forks":55,"open_issues":174,"watchers":168,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/typetools/checker-framework/pulls/994"},"html":{"href":"https://github.com/typetools/checker-framework/pull/994"},"issue":{"href":"https://api.github.com/repos/typetools/checker-framework/issues/994"},"comments":{"href":"https://api.github.com/repos/typetools/checker-framework/issues/994/comments"},"review_comments":{"href":"https://api.github.com/repos/typetools/checker-framework/pulls/994/comments"},"review_comment":{"href":"https://api.github.com/repos/typetools/checker-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/typetools/checker-framework/pulls/994/commits"},"statuses":{"href":"https://api.github.com/repos/typetools/checker-framework/statuses/8cd0b6fb5937ace415309a00bb0292cdff3df28a"}}}}
{"actor":{"display_login":"mernst"}}