{"action":"opened","issue":{"url":"https://api.github.com/repos/MatAtBread/fast-async/issues/30","repository_url":"https://api.github.com/repos/MatAtBread/fast-async","labels_url":"https://api.github.com/repos/MatAtBread/fast-async/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/MatAtBread/fast-async/issues/30/comments","events_url":"https://api.github.com/repos/MatAtBread/fast-async/issues/30/events","html_url":"https://github.com/MatAtBread/fast-async/issues/30","id":195278511,"number":30,"title":"IOS strict mode transformation bug","user":{"login":"Morkowski","id":12064267,"avatar_url":"https://avatars.githubusercontent.com/u/12064267?v=3","gravatar_id":"","url":"https://api.github.com/users/Morkowski","html_url":"https://github.com/Morkowski","followers_url":"https://api.github.com/users/Morkowski/followers","following_url":"https://api.github.com/users/Morkowski/following{/other_user}","gists_url":"https://api.github.com/users/Morkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/Morkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Morkowski/subscriptions","organizations_url":"https://api.github.com/users/Morkowski/orgs","repos_url":"https://api.github.com/users/Morkowski/repos","events_url":"https://api.github.com/users/Morkowski/events{/privacy}","received_events_url":"https://api.github.com/users/Morkowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-13T15:11:50Z","updated_at":"2016-12-13T15:11:50Z","closed_at":null,"body":"Code:\r\n\r\n```\r\nclass exampleClass {\r\n    async fun1(){}\r\n    async fun2() {\r\n        const channel = await this.fun1();\r\n        try {return await this.fun1();} catch(e) {\r\n            return false;\r\n        }\r\n    }\r\n}\r\nexport default EpgController;\r\n\r\n```\r\n\r\nwhich is trasformed to:\r\n\r\n```\r\n(...)\r\n\"use strict\";\r\n(...)\r\n\r\nvar exampleClass = function () {\r\n    function exampleClass() {\r\n        _classCallCheck(this, exampleClass);\r\n    }\r\n\r\n    _createClass(exampleClass, [{\r\n        key: \"fun1\",\r\n        value: function fun1() {\r\n            return new Promise(function ($return, $error) {\r\n                return $return();\r\n            }.bind(this));\r\n        }\r\n    }, {\r\n        key: \"fun2\",\r\n        value: function fun2() {\r\n            return new Promise(function ($return, $error) {\r\n                var channel;\r\n                return this.fun1().then(function ($await_2) {\r\n                    try {\r\n                        channel = $await_2;\r\n\r\n                        function $Try_1_Post() {\r\n                            return $return();\r\n                        }\r\n\r\n                        var $Try_1_Catch = function (e) {\r\n                            try {\r\n                                return $return(false);\r\n                            } catch ($boundEx) {\r\n                                return $error($boundEx);\r\n                            }\r\n                        }.bind(this);try {\r\n                            return this.fun1().then($return, $Try_1_Catch);\r\n                        } catch (e) {\r\n                            $Try_1_Catch(e)\r\n                        }\r\n                    } catch ($boundEx) {\r\n                        return $error($boundEx);\r\n                    }\r\n                }.bind(this), $error);\r\n            }.bind(this));\r\n        }\r\n    }]);\r\n\r\n    return exampleClass;\r\n}();\r\n\r\n```\r\n\r\non IOS I get error \r\n_Strict mode does not allow function declarations in a lexically nested statement._\r\nconnected with code:\r\n\r\n```\r\ntry {\r\n        function $Try_1_Post() {\r\n            return $return();\r\n        }\r\n}\r\n```\r\nAny ideas how to fix it?"}}
{"actor":{"display_login":"Morkowski"}}