{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/682","repository_url":"https://api.github.com/repos/babel/babel","labels_url":"https://api.github.com/repos/babel/babel/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/682/comments","events_url":"https://api.github.com/repos/babel/babel/issues/682/events","html_url":"https://github.com/babel/babel/issues/682","id":56399699,"number":682,"title":"Spec compatibility: Calling class constructor functions as function should throw","user":{"login":"fkling","id":179026,"avatar_url":"https://avatars0.githubusercontent.com/u/179026?v=4","gravatar_id":"","url":"https://api.github.com/users/fkling","html_url":"https://github.com/fkling","followers_url":"https://api.github.com/users/fkling/followers","following_url":"https://api.github.com/users/fkling/following{/other_user}","gists_url":"https://api.github.com/users/fkling/gists{/gist_id}","starred_url":"https://api.github.com/users/fkling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkling/subscriptions","organizations_url":"https://api.github.com/users/fkling/orgs","repos_url":"https://api.github.com/users/fkling/repos","events_url":"https://api.github.com/users/fkling/events{/privacy}","received_events_url":"https://api.github.com/users/fkling/received_events","type":"User","site_admin":false},"labels":[{"id":148227217,"url":"https://api.github.com/repos/babel/babel/labels/PR:%20Spec%20Compliancy","name":"PR: Spec Compliancy","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":{"login":"kittens","id":853712,"avatar_url":"https://avatars0.githubusercontent.com/u/853712?v=4","gravatar_id":"","url":"https://api.github.com/users/kittens","html_url":"https://github.com/kittens","followers_url":"https://api.github.com/users/kittens/followers","following_url":"https://api.github.com/users/kittens/following{/other_user}","gists_url":"https://api.github.com/users/kittens/gists{/gist_id}","starred_url":"https://api.github.com/users/kittens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kittens/subscriptions","organizations_url":"https://api.github.com/users/kittens/orgs","repos_url":"https://api.github.com/users/kittens/repos","events_url":"https://api.github.com/users/kittens/events{/privacy}","received_events_url":"https://api.github.com/users/kittens/received_events","type":"User","site_admin":false},"assignees":[{"login":"kittens","id":853712,"avatar_url":"https://avatars0.githubusercontent.com/u/853712?v=4","gravatar_id":"","url":"https://api.github.com/users/kittens","html_url":"https://github.com/kittens","followers_url":"https://api.github.com/users/kittens/followers","following_url":"https://api.github.com/users/kittens/following{/other_user}","gists_url":"https://api.github.com/users/kittens/gists{/gist_id}","starred_url":"https://api.github.com/users/kittens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kittens/subscriptions","organizations_url":"https://api.github.com/users/kittens/orgs","repos_url":"https://api.github.com/users/kittens/repos","events_url":"https://api.github.com/users/kittens/events{/privacy}","received_events_url":"https://api.github.com/users/kittens/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2015-02-03T16:20:10Z","updated_at":"2017-12-11T11:56:53Z","closed_at":"2015-02-03T19:19:54Z","author_association":"CONTRIBUTOR","body":"This is probably very difficult or impossible to achieve. According to the [newest draft (rev32)](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#february_2_2015_draft_rev_32), calling a `class` constructor function like a normal function (basically everything but calling it with `new` as far as I understand), should throw a `TypeError`:\n\n``` js\nclass Foo {}\nFoo(); // should throw\nFoo.call({});  // should throw\nFoo.apply({});  // should throw\n```\n\nThe spec uses an internal flag on the function object for that. \n\nNot sure we can do anything here, just raising awareness and keep track of it.\n"},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/350704040","html_url":"https://github.com/babel/babel/issues/682#issuecomment-350704040","issue_url":"https://api.github.com/repos/babel/babel/issues/682","id":350704040,"user":{"login":"k1r0s","id":6052309,"avatar_url":"https://avatars2.githubusercontent.com/u/6052309?v=4","gravatar_id":"","url":"https://api.github.com/users/k1r0s","html_url":"https://github.com/k1r0s","followers_url":"https://api.github.com/users/k1r0s/followers","following_url":"https://api.github.com/users/k1r0s/following{/other_user}","gists_url":"https://api.github.com/users/k1r0s/gists{/gist_id}","starred_url":"https://api.github.com/users/k1r0s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k1r0s/subscriptions","organizations_url":"https://api.github.com/users/k1r0s/orgs","repos_url":"https://api.github.com/users/k1r0s/repos","events_url":"https://api.github.com/users/k1r0s/events{/privacy}","received_events_url":"https://api.github.com/users/k1r0s/received_events","type":"User","site_admin":false},"created_at":"2017-12-11T11:56:53Z","updated_at":"2017-12-11T11:56:53Z","author_association":"NONE","body":"Yes I'm using apply over constructor function.\r\n\r\nBut I'm not agree about the workaround. TypeScript or V8 harmony impl doesn't complain about constructor wrapping"}}
{"actor":{"display_login":"k1r0s"}}