{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/6421","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/6421/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/6421/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/6421/events","html_url":"https://github.com/facebook/hhvm/issues/6421","id":113160951,"number":6421,"title":"Support for late static binding","user":{"login":"tslettebo","id":7471024,"avatar_url":"https://avatars.githubusercontent.com/u/7471024?v=3","gravatar_id":"","url":"https://api.github.com/users/tslettebo","html_url":"https://github.com/tslettebo","followers_url":"https://api.github.com/users/tslettebo/followers","following_url":"https://api.github.com/users/tslettebo/following{/other_user}","gists_url":"https://api.github.com/users/tslettebo/gists{/gist_id}","starred_url":"https://api.github.com/users/tslettebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tslettebo/subscriptions","organizations_url":"https://api.github.com/users/tslettebo/orgs","repos_url":"https://api.github.com/users/tslettebo/repos","events_url":"https://api.github.com/users/tslettebo/events{/privacy}","received_events_url":"https://api.github.com/users/tslettebo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-24T13:44:26Z","updated_at":"2015-10-26T02:15:59Z","closed_at":"2015-10-26T02:15:59Z","body":"The following runs, but fails the typechecker:\r\n```\r\nclass Base\r\n{\r\n  public function __construct()\r\n  {\r\n    echo static::value();\r\n  }\r\n}\r\n\r\nclass Derived extends Base\r\n{\r\n  public static function value(): string { return \"Test\"; }\r\n}\r\n\r\n$test=new Derived();\r\n```\r\nIs there a way to make it pass the typechecker?\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/hhvm/issues/comments/151002849","html_url":"https://github.com/facebook/hhvm/issues/6421#issuecomment-151002849","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/6421","id":151002849,"user":{"login":"paulbiss","id":1039792,"avatar_url":"https://avatars.githubusercontent.com/u/1039792?v=3","gravatar_id":"","url":"https://api.github.com/users/paulbiss","html_url":"https://github.com/paulbiss","followers_url":"https://api.github.com/users/paulbiss/followers","following_url":"https://api.github.com/users/paulbiss/following{/other_user}","gists_url":"https://api.github.com/users/paulbiss/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbiss/subscriptions","organizations_url":"https://api.github.com/users/paulbiss/orgs","repos_url":"https://api.github.com/users/paulbiss/repos","events_url":"https://api.github.com/users/paulbiss/events{/privacy}","received_events_url":"https://api.github.com/users/paulbiss/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T02:15:59Z","updated_at":"2015-10-26T02:15:59Z","body":"Yeah, it sounds like what you want here is an abstract base that requires derived classes to define value()."}}