{"action":"created","issue":{"url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/3297","repository_url":"https://api.github.com/repos/mishoo/UglifyJS2","labels_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/3297/labels{/name}","comments_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/3297/comments","events_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/3297/events","html_url":"https://github.com/mishoo/UglifyJS2/issues/3297","id":383593193,"node_id":"MDU6SXNzdWUzODM1OTMxOTM=","number":3297,"title":"Possibly wrong recursive function calls uglification","user":{"login":"maxihornes","id":11995964,"node_id":"MDQ6VXNlcjExOTk1OTY0","avatar_url":"https://avatars0.githubusercontent.com/u/11995964?v=4","gravatar_id":"","url":"https://api.github.com/users/maxihornes","html_url":"https://github.com/maxihornes","followers_url":"https://api.github.com/users/maxihornes/followers","following_url":"https://api.github.com/users/maxihornes/following{/other_user}","gists_url":"https://api.github.com/users/maxihornes/gists{/gist_id}","starred_url":"https://api.github.com/users/maxihornes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxihornes/subscriptions","organizations_url":"https://api.github.com/users/maxihornes/orgs","repos_url":"https://api.github.com/users/maxihornes/repos","events_url":"https://api.github.com/users/maxihornes/events{/privacy}","received_events_url":"https://api.github.com/users/maxihornes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-11-22T16:01:43Z","updated_at":"2018-11-24T21:37:55Z","closed_at":null,"author_association":"NONE","body":"**Bug report**\r\n\r\nHi, guys. I detected an issue in an application that I'am working, and found that uglify is breaking the code. \r\n\r\n**Uglify version 3.49**\r\n\r\n**code.js**:\r\n```\r\nfunction function1() {\r\n    var r = {\r\n        function2: function2\r\n    };\r\n\r\n    function function2() {\r\n        alert(1234);\r\n        function function3() {\r\n            function2();\r\n        };\r\n\r\n        function3();\r\n    }\r\n\r\n    return r;\r\n}\r\n```\r\n\r\n**uglifyjs --compress --mangle code.js result.js**\r\n\r\n--\r\n\r\n**result.js**:\r\n```\r\nfunction function1() {\r\n    function t() {\r\n        alert(1234);\r\n        function e() {\r\n            t()\r\n        }\r\n        e()\r\n    }\r\n    return {\r\n        function2: function() {\r\n            alert(1234);\r\n            t()\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n--\r\n\r\nAnd I would expect something like:\r\n\r\n**expected.js**:\r\n```\r\nfunction function1() {\r\n    return {\r\n        function2: t() {\r\n            alert(1234);\r\n            function e() {\r\n                t()\r\n            }\r\n            e()\r\n         }\r\n    }\r\n}\r\n```\r\n\r\n--\r\n\r\nI also tried with previous versions and it looks like 3.3.3 started to break the code:\r\nhttps://github.com/mishoo/UglifyJS2/compare/v3.3.2...v3.3.3\r\n\r\n**3.3.2.js**\r\n```\r\nfunction function1() {\r\n    function e() {\r\n        alert(1234),\r\n        e()\r\n    }\r\n    return {\r\n        function2: e\r\n    }\r\n}\r\n```\r\n\r\nPlease, bear in mind that this is a highly reduced version of the real code (where there is no never-ending recursion) to detect when uglify is breaking the code.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/comments/441397379","html_url":"https://github.com/mishoo/UglifyJS2/issues/3297#issuecomment-441397379","issue_url":"https://api.github.com/repos/mishoo/UglifyJS2/issues/3297","id":441397379,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTM5NzM3OQ==","user":{"login":"maxihornes","id":11995964,"node_id":"MDQ6VXNlcjExOTk1OTY0","avatar_url":"https://avatars0.githubusercontent.com/u/11995964?v=4","gravatar_id":"","url":"https://api.github.com/users/maxihornes","html_url":"https://github.com/maxihornes","followers_url":"https://api.github.com/users/maxihornes/followers","following_url":"https://api.github.com/users/maxihornes/following{/other_user}","gists_url":"https://api.github.com/users/maxihornes/gists{/gist_id}","starred_url":"https://api.github.com/users/maxihornes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxihornes/subscriptions","organizations_url":"https://api.github.com/users/maxihornes/orgs","repos_url":"https://api.github.com/users/maxihornes/repos","events_url":"https://api.github.com/users/maxihornes/events{/privacy}","received_events_url":"https://api.github.com/users/maxihornes/received_events","type":"User","site_admin":false},"created_at":"2018-11-24T21:37:55Z","updated_at":"2018-11-24T21:37:55Z","author_association":"NONE","body":"Thank you for your help and patience. I'll try with Terser.\r\n\r\nRegards!"}}
{"actor":{"display_login":"maxihornes"}}