{"action":"closed","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4969","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4969/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4969/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4969/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/4969","id":142594146,"number":4969,"title":"[analyzer] Block-terminators in value-places","user":{"login":"Simn","id":634365,"avatar_url":"https://avatars.githubusercontent.com/u/634365?v=3","gravatar_id":"","url":"https://api.github.com/users/Simn","html_url":"https://github.com/Simn","followers_url":"https://api.github.com/users/Simn/followers","following_url":"https://api.github.com/users/Simn/following{/other_user}","gists_url":"https://api.github.com/users/Simn/gists{/gist_id}","starred_url":"https://api.github.com/users/Simn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simn/subscriptions","organizations_url":"https://api.github.com/users/Simn/orgs","repos_url":"https://api.github.com/users/Simn/repos","events_url":"https://api.github.com/users/Simn/events{/privacy}","received_events_url":"https://api.github.com/users/Simn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HaxeFoundation/haxe/labels/feature-analyzer","name":"feature-analyzer","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"Simn","id":634365,"avatar_url":"https://avatars.githubusercontent.com/u/634365?v=3","gravatar_id":"","url":"https://api.github.com/users/Simn","html_url":"https://github.com/Simn","followers_url":"https://api.github.com/users/Simn/followers","following_url":"https://api.github.com/users/Simn/following{/other_user}","gists_url":"https://api.github.com/users/Simn/gists{/gist_id}","starred_url":"https://api.github.com/users/Simn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simn/subscriptions","organizations_url":"https://api.github.com/users/Simn/orgs","repos_url":"https://api.github.com/users/Simn/repos","events_url":"https://api.github.com/users/Simn/events{/privacy}","received_events_url":"https://api.github.com/users/Simn/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/milestones/5","html_url":"https://github.com/HaxeFoundation/haxe/milestones/3.3.0-rc1","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/milestones/5/labels","id":586975,"number":5,"title":"3.3.0-rc1","description":"","creator":{"login":"ncannasse","id":1022912,"avatar_url":"https://avatars.githubusercontent.com/u/1022912?v=3","gravatar_id":"","url":"https://api.github.com/users/ncannasse","html_url":"https://github.com/ncannasse","followers_url":"https://api.github.com/users/ncannasse/followers","following_url":"https://api.github.com/users/ncannasse/following{/other_user}","gists_url":"https://api.github.com/users/ncannasse/gists{/gist_id}","starred_url":"https://api.github.com/users/ncannasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncannasse/subscriptions","organizations_url":"https://api.github.com/users/ncannasse/orgs","repos_url":"https://api.github.com/users/ncannasse/repos","events_url":"https://api.github.com/users/ncannasse/events{/privacy}","received_events_url":"https://api.github.com/users/ncannasse/received_events","type":"User","site_admin":false},"open_issues":92,"closed_issues":204,"state":"open","created_at":"2014-03-04T14:22:27Z","updated_at":"2016-03-22T09:44:48Z","due_on":"2016-04-02T22:00:00Z","closed_at":null},"comments":0,"created_at":"2016-03-22T09:36:13Z","updated_at":"2016-03-22T09:44:48Z","closed_at":"2016-03-22T09:44:48Z","body":"Currently the analyzer rejects terminators in value-places:\r\n\r\n```haxe\r\nclass Main {\r\n\tstatic function main() {}\r\n\r\n\tstatic function test1() {\r\n\t\tvar __return = function(x:Dynamic) { return 1; }\r\n\t\t__return(throw null); // Cannot use this expression as value\r\n\t}\r\n\r\n\tstatic function test2() {\r\n\t\tvar __return = function(x:Dynamic) { return 1; }\r\n\t\t __return(return null); // Cannot use this expression as value\r\n\t}\r\n\r\n\tstatic function test3() {\r\n\t\tvar __return = function(x:Dynamic) { return 1; }\r\n\t\twhile (true) {\r\n\t\t\t__return(break); // Cannot use this expression as value\r\n\t\t}\r\n\t}\r\n\r\n\tstatic function test4() {\r\n\t\tvar __return = function(x:Dynamic) { return 1; }\r\n\t\twhile (true) {\r\n\t\t\t__return(continue); // Cannot use this expression as value\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n\r\nInstead of erroring we can simply add them as a block-element."}}