{"action":"opened","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5826","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5826/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5826/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5826/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/5826","id":189391411,"number":5826,"title":"Analyzer produces wrong temp var with -D analyzer-code-motion","user":{"login":"frabbit","id":1387338,"avatar_url":"https://avatars.githubusercontent.com/u/1387338?v=3","gravatar_id":"","url":"https://api.github.com/users/frabbit","html_url":"https://github.com/frabbit","followers_url":"https://api.github.com/users/frabbit/followers","following_url":"https://api.github.com/users/frabbit/following{/other_user}","gists_url":"https://api.github.com/users/frabbit/gists{/gist_id}","starred_url":"https://api.github.com/users/frabbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frabbit/subscriptions","organizations_url":"https://api.github.com/users/frabbit/orgs","repos_url":"https://api.github.com/users/frabbit/repos","events_url":"https://api.github.com/users/frabbit/events{/privacy}","received_events_url":"https://api.github.com/users/frabbit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-15T13:27:52Z","updated_at":"2016-11-15T13:27:52Z","closed_at":null,"body":"```haxe\r\nclass Test {\r\n  static function main () {\r\n    function foo (?startIndex:Int) {\r\n      var i = 0;\r\n      while ( i < 5 && (startIndex == null || i < startIndex + 1)) {\r\n        i++;\r\n      }\r\n    }\r\n    foo();\r\n    foo(2);\r\n    foo(null);\r\n  }\r\n}\r\n```\r\nproduces this code:\r\n```\r\nfoo1 = (startIndex + 1) // at this point startIndex can be null, which fails on python and can be a problem on other targets too.\r\n    while ((i < 5) and (((startIndex is None) or ((i < foo1))))):\r\n       i = (i + 1)\r\n```\r\n"}}
{"actor":{"display_login":"frabbit"}}