{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/3387","labels_url":"https://api.github.com/repos/godotengine/godot/issues/3387/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/3387/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/3387/events","html_url":"https://github.com/godotengine/godot/issues/3387","id":127459529,"number":3387,"title":"Initialization bugs in inner classes with many levels of inheritance","user":{"login":"slapin","id":6099,"avatar_url":"https://avatars.githubusercontent.com/u/6099?v=3","gravatar_id":"","url":"https://api.github.com/users/slapin","html_url":"https://github.com/slapin","followers_url":"https://api.github.com/users/slapin/followers","following_url":"https://api.github.com/users/slapin/following{/other_user}","gists_url":"https://api.github.com/users/slapin/gists{/gist_id}","starred_url":"https://api.github.com/users/slapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slapin/subscriptions","organizations_url":"https://api.github.com/users/slapin/orgs","repos_url":"https://api.github.com/users/slapin/repos","events_url":"https://api.github.com/users/slapin/events{/privacy}","received_events_url":"https://api.github.com/users/slapin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/godotengine/godot/labels/bug","name":"bug","color":"ff2222"},{"url":"https://api.github.com/repos/godotengine/godot/labels/topic:gdscript","name":"topic:gdscript","color":"ffdd44"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-19T14:37:53Z","updated_at":"2016-01-19T14:49:52Z","closed_at":null,"body":"Running the script\r\n```python\r\nextends Spatial\r\n\r\nclass Foo extends Node:\r\n        func _init(f):\r\n                .init()\r\n                print(\"Foo\")\r\nclass Bar extends Foo:\r\n        var d\r\n        func _init(f, g):\r\n                ._init(f)\r\n                d = g\r\nclass Bar2 extends Bar:\r\n        var t\r\n        func check(d):\r\n                t = d\r\n                print(t)\r\nfunc _ready():\r\n        var ch = Bar2.new(\"a\", \"b\")\r\n```\r\n\r\ntells me that new() requires 0 arguments. If we run Bar.new(\"a\") instead, everything works properly.\r\nAdding separate _init() to Bar2 doesn't solve a problem, as changing Bar2 to this:\r\n```python\r\nclass Bar2 extends Bar:\r\n        var t\r\n        func check(d):\r\n                t = d\r\n                print(t)\r\n        func _init(f, g):\r\n                ._init(f, g)\r\n```\r\nproduces error message which requires 2 arguments for .new()"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/172875582","html_url":"https://github.com/godotengine/godot/issues/3387#issuecomment-172875582","issue_url":"https://api.github.com/repos/godotengine/godot/issues/3387","id":172875582,"user":{"login":"slapin","id":6099,"avatar_url":"https://avatars.githubusercontent.com/u/6099?v=3","gravatar_id":"","url":"https://api.github.com/users/slapin","html_url":"https://github.com/slapin","followers_url":"https://api.github.com/users/slapin/followers","following_url":"https://api.github.com/users/slapin/following{/other_user}","gists_url":"https://api.github.com/users/slapin/gists{/gist_id}","starred_url":"https://api.github.com/users/slapin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slapin/subscriptions","organizations_url":"https://api.github.com/users/slapin/orgs","repos_url":"https://api.github.com/users/slapin/repos","events_url":"https://api.github.com/users/slapin/events{/privacy}","received_events_url":"https://api.github.com/users/slapin/received_events","type":"User","site_admin":false},"created_at":"2016-01-19T14:49:52Z","updated_at":"2016-01-19T14:49:52Z","body":"Need to mention that Bar class works as intended (really seriously tested that)., only Bar2 and later have problems."}}