{"action":"created","issue":{"url":"https://api.github.com/repos/eventEmitter/ee-class/issues/2","labels_url":"https://api.github.com/repos/eventEmitter/ee-class/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/eventEmitter/ee-class/issues/2/comments","events_url":"https://api.github.com/repos/eventEmitter/ee-class/issues/2/events","html_url":"https://github.com/eventEmitter/ee-class/issues/2","id":53339797,"number":2,"title":"Wrong inherited","user":{"login":"nnseva","id":496812,"avatar_url":"https://avatars.githubusercontent.com/u/496812?v=3","gravatar_id":"","url":"https://api.github.com/users/nnseva","html_url":"https://github.com/nnseva","followers_url":"https://api.github.com/users/nnseva/followers","following_url":"https://api.github.com/users/nnseva/following{/other_user}","gists_url":"https://api.github.com/users/nnseva/gists{/gist_id}","starred_url":"https://api.github.com/users/nnseva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnseva/subscriptions","organizations_url":"https://api.github.com/users/nnseva/orgs","repos_url":"https://api.github.com/users/nnseva/repos","events_url":"https://api.github.com/users/nnseva/events{/privacy}","received_events_url":"https://api.github.com/users/nnseva/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-04T15:50:24Z","updated_at":"2015-01-04T15:52:41Z","closed_at":"2015-01-04T15:52:41Z","body":"The recursive .inherited call in the inherited method calls the object itself class methos instead of base class method, it leads to infinite recursion\r\n\r\n```javascript\r\nvar Cls = require(\"Cls\");\r\n\r\nvar A = Cls({\r\n  methods: {\r\n    constructor: function(x) {\r\n        console.log(\"A:\",x);\r\n    }\r\n  }\r\n});\r\n\r\nvar B = Cls({\r\n  uber: A,\r\n  methods: {\r\n    constructor: function(x) {\r\n        console.log(\"B:\",x);\r\n        this.inherited('constructor',[x]);\r\n    }\r\n  }\r\n});\r\n\r\nvar C = Cls({\r\n  uber: B,\r\n  methods: {\r\n    constructor: function(x) {\r\n        console.log(\"C:\",x);\r\n        this.inherited('constructor',[x]);\r\n    }\r\n  }\r\n});\r\n\r\nvar a = new A(1);\r\n// Good result, as expected\r\n// A: 1\r\nvar b = new B(2);\r\n// Good result, as expected\r\n// B: 2\r\n// A: 2\r\nvar c = new C(3);\r\n// Bad result, recursive call for B\r\n// C: 3\r\n// B: 3\r\n// B: 3\r\n// ...\r\n```\r\n\r\nThe same for usual methods, not only constructor.\r\n"},"comment":{"url":"https://api.github.com/repos/eventEmitter/ee-class/issues/comments/68637358","html_url":"https://github.com/eventEmitter/ee-class/issues/2#issuecomment-68637358","issue_url":"https://api.github.com/repos/eventEmitter/ee-class/issues/2","id":68637358,"user":{"login":"nnseva","id":496812,"avatar_url":"https://avatars.githubusercontent.com/u/496812?v=3","gravatar_id":"","url":"https://api.github.com/users/nnseva","html_url":"https://github.com/nnseva","followers_url":"https://api.github.com/users/nnseva/followers","following_url":"https://api.github.com/users/nnseva/following{/other_user}","gists_url":"https://api.github.com/users/nnseva/gists{/gist_id}","starred_url":"https://api.github.com/users/nnseva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nnseva/subscriptions","organizations_url":"https://api.github.com/users/nnseva/orgs","repos_url":"https://api.github.com/users/nnseva/repos","events_url":"https://api.github.com/users/nnseva/events{/privacy}","received_events_url":"https://api.github.com/users/nnseva/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T15:52:41Z","updated_at":"2015-01-04T15:52:41Z","body":"Sorry, missed a repository ..."}}