{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3311","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3311/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3311/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3311/events","html_url":"https://github.com/Microsoft/TypeScript/issues/3311","id":82885024,"number":3311,"title":"Cannot do anything before super()","user":{"login":"NekR","id":1189265,"avatar_url":"https://avatars.githubusercontent.com/u/1189265?v=3","gravatar_id":"","url":"https://api.github.com/users/NekR","html_url":"https://github.com/NekR","followers_url":"https://api.github.com/users/NekR/followers","following_url":"https://api.github.com/users/NekR/following{/other_user}","gists_url":"https://api.github.com/users/NekR/gists{/gist_id}","starred_url":"https://api.github.com/users/NekR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NekR/subscriptions","organizations_url":"https://api.github.com/users/NekR/orgs","repos_url":"https://api.github.com/users/NekR/repos","events_url":"https://api.github.com/users/NekR/events{/privacy}","received_events_url":"https://api.github.com/users/NekR/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Accepting%20PRs","name":"Accepting PRs","color":"009800"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Effort:%20Moderate","name":"Effort: Moderate","color":"207de5"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/2","html_url":"https://github.com/Microsoft/TypeScript/milestones/Community","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/2/labels","id":721044,"number":2,"title":"Community","description":"Issues in the 'Community' milestone are ones which we are accepting pull requests for","creator":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"open_issues":148,"closed_issues":76,"state":"open","created_at":"2014-07-14T23:24:58Z","updated_at":"2016-02-22T19:07:13Z","due_on":null,"closed_at":null},"comments":20,"created_at":"2015-05-30T18:54:18Z","updated_at":"2016-02-22T19:07:13Z","closed_at":"2016-02-22T19:07:13Z","body":"Consider this code:\r\n\r\n```typescript\r\nclass Super {\r\n  _view:Element;\r\n\r\n  constructor(view?:Element) {\r\n    this._view = view || document.createElement('div');\r\n  };\r\n}\r\n\r\nclass Inherits extends Super {\r\n  test = 1;\r\n  view:Element;\r\n\r\n  constructor() {\r\n    let view = document.createElement('span');\r\n    super(view);\r\n\r\n    this.view = view;\r\n  };\r\n}\r\n```\r\n\r\nAnd it says: ```2376 A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.```\r\n\r\nI understand that it's because of ```test``` property. but can you allow not-```this``` code before ```super()``` call how ES6 does?\r\n\r\nAlso, this won't work too, of course:\r\n```typescript\r\nclass Inherits extends Super {\r\n  test = 1;\r\n  view:Element = document.createElement('span');\r\n\r\n  constructor() {\r\n    super(this.view); // 2332 'this' cannot be referenced in current location.\r\n  };\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/187323033","html_url":"https://github.com/Microsoft/TypeScript/issues/3311#issuecomment-187323033","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/3311","id":187323033,"user":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"created_at":"2016-02-22T19:07:13Z","updated_at":"2016-02-22T19:07:13Z","body":"should be addressed by https://github.com/Microsoft/TypeScript/pull/6860"}}