{"action":"created","issue":{"url":"https://api.github.com/repos/rollup/rollup/issues/1622","repository_url":"https://api.github.com/repos/rollup/rollup","labels_url":"https://api.github.com/repos/rollup/rollup/issues/1622/labels{/name}","comments_url":"https://api.github.com/repos/rollup/rollup/issues/1622/comments","events_url":"https://api.github.com/repos/rollup/rollup/issues/1622/events","html_url":"https://github.com/rollup/rollup/issues/1622","id":256569212,"number":1622,"title":"break inside look which refers to containing block erroneously dropped","user":{"login":"Conduitry","id":16696352,"avatar_url":"https://avatars1.githubusercontent.com/u/16696352?v=4","gravatar_id":"","url":"https://api.github.com/users/Conduitry","html_url":"https://github.com/Conduitry","followers_url":"https://api.github.com/users/Conduitry/followers","following_url":"https://api.github.com/users/Conduitry/following{/other_user}","gists_url":"https://api.github.com/users/Conduitry/gists{/gist_id}","starred_url":"https://api.github.com/users/Conduitry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Conduitry/subscriptions","organizations_url":"https://api.github.com/users/Conduitry/orgs","repos_url":"https://api.github.com/users/Conduitry/repos","events_url":"https://api.github.com/users/Conduitry/events{/privacy}","received_events_url":"https://api.github.com/users/Conduitry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-11T03:02:00Z","updated_at":"2017-09-11T03:31:25Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"[REPL](https://rollupjs.org/repl?version=0.49.3&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmxhYmVsJTNBJTIwJTdCJTVDbiU1Q3R3aGlsZSUyMChmb28pJTIwJTdCJTVDbiU1Q3QlNUN0aWYlMjAoYmFyKSUyMCU3QiU1Q24lNUN0JTVDdCU1Q3RicmVhayUyMGxhYmVsJTNCJTVDbiU1Q3QlNUN0JTdEJTVDbiU1Q3QlN0QlNUNuJTVDdGJheiUzQiU1Q24lN0QlMjIlN0QlNUQlMkMlMjJvcHRpb25zJTIyJTNBJTdCJTIyZm9ybWF0JTIyJTNBJTIyY2pzJTIyJTJDJTIyZ2xvYmFscyUyMiUzQSU3QiU3RCUyQyUyMm5hbWUlMjIlM0ElMjJteUJ1bmRsZSUyMiUyQyUyMmFtZCUyMiUzQSU3QiUyMmlkJTIyJTNBJTIyJTIyJTdEJTdEJTJDJTIyZXhhbXBsZSUyMiUzQW51bGwlN0Q=)\r\n\r\n```javascript\r\nlabel: {\r\n\twhile (foo) {\r\n\t\tif (bar) {\r\n\t\t\tbreak label;\r\n\t\t}\r\n\t}\r\n\tbaz;\r\n}\r\n```\r\n\r\nbundles to\r\n\r\n```\r\n'use strict';\r\n\r\nlabel: {\r\n\tbaz;\r\n}\r\n```\r\n\r\nThis also occurs with a for loop instead of a while loop. It does not seem to occur when the if and break appear directly inside of the block."},"comment":{"url":"https://api.github.com/repos/rollup/rollup/issues/comments/328406623","html_url":"https://github.com/rollup/rollup/issues/1622#issuecomment-328406623","issue_url":"https://api.github.com/repos/rollup/rollup/issues/1622","id":328406623,"user":{"login":"kzc","id":11593452,"avatar_url":"https://avatars3.githubusercontent.com/u/11593452?v=4","gravatar_id":"","url":"https://api.github.com/users/kzc","html_url":"https://github.com/kzc","followers_url":"https://api.github.com/users/kzc/followers","following_url":"https://api.github.com/users/kzc/following{/other_user}","gists_url":"https://api.github.com/users/kzc/gists{/gist_id}","starred_url":"https://api.github.com/users/kzc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzc/subscriptions","organizations_url":"https://api.github.com/users/kzc/orgs","repos_url":"https://api.github.com/users/kzc/repos","events_url":"https://api.github.com/users/kzc/events{/privacy}","received_events_url":"https://api.github.com/users/kzc/received_events","type":"User","site_admin":false},"created_at":"2017-09-11T03:31:25Z","updated_at":"2017-09-11T03:31:25Z","author_association":"CONTRIBUTOR","body":"Fix:\r\n```diff\r\n--- a/src/ast/nodes/BreakStatement.js\r\n+++ b/src/ast/nodes/BreakStatement.js\r\n@@ -3,6 +3,7 @@ import Node from '../Node.js';\r\n export default class BreakStatement extends Node {\r\n        hasEffects ( options ) {\r\n                return super.hasEffects( options )\r\n+                       || this.label\r\n                        || !options.inNestedBreakableStatement;\r\n        }\r\n \r\n```"}}
{"actor":{"display_login":"kzc"}}