{"action":"closed","issue":{"url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/493","repository_url":"https://api.github.com/repos/TiVo/intellij-haxe","labels_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/493/labels{/name}","comments_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/493/comments","events_url":"https://api.github.com/repos/TiVo/intellij-haxe/issues/493/events","html_url":"https://github.com/TiVo/intellij-haxe/issues/493","id":181329396,"number":493,"title":"Optimize imports breaks code sometimes","user":{"login":"winmain","id":167248,"avatar_url":"https://avatars.githubusercontent.com/u/167248?v=3","gravatar_id":"","url":"https://api.github.com/users/winmain","html_url":"https://github.com/winmain","followers_url":"https://api.github.com/users/winmain/followers","following_url":"https://api.github.com/users/winmain/following{/other_user}","gists_url":"https://api.github.com/users/winmain/gists{/gist_id}","starred_url":"https://api.github.com/users/winmain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winmain/subscriptions","organizations_url":"https://api.github.com/users/winmain/orgs","repos_url":"https://api.github.com/users/winmain/repos","events_url":"https://api.github.com/users/winmain/events{/privacy}","received_events_url":"https://api.github.com/users/winmain/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TiVo/intellij-haxe/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/TiVo/intellij-haxe/labels/Priority%202","name":"Priority 2","color":"ff5e00"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-06T05:44:36Z","updated_at":"2016-10-11T14:15:41Z","closed_at":"2016-10-11T14:15:41Z","body":"When I try to optimize this code:\r\n```haxe\r\nimport js.Browser;  // unused import\r\nimport js.Lib;\r\nimport js.Cookie;\r\n\r\nclass Test {\r\n  public function new() {\r\n    Cookie.all();\r\n    Lib.debug();\r\n  }\r\n}\r\n```\r\nI got this:\r\n```haxe\r\niimport js.Cookie;   // double \"i\"\r\nimport js.Lib;       // no blank line after imports\r\nclass Test {\r\n  public function new() {\r\n    Cookie.all();\r\n    Lib.debug();\r\n  }\r\n}\r\n```\r\n\r\nThe problem arises in this conditions: 1 unused import + 2 used imports. Only in this order.\r\n\r\nPlugin version: `Pre-release candidate 0.10.1-RC1`\r\nIdea: `2016.2`"}}
{"actor":{"display_login":"winmain"}}