{"action":"opened","issue":{"url":"https://api.github.com/repos/konsoletyper/teavm/issues/57","labels_url":"https://api.github.com/repos/konsoletyper/teavm/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/konsoletyper/teavm/issues/57/comments","events_url":"https://api.github.com/repos/konsoletyper/teavm/issues/57/events","html_url":"https://github.com/konsoletyper/teavm/issues/57","id":57284676,"number":57,"title":"entry points causing virtual method invocation","user":{"login":"wh0","id":382796,"avatar_url":"https://avatars.githubusercontent.com/u/382796?v=3","gravatar_id":"","url":"https://api.github.com/users/wh0","html_url":"https://github.com/wh0","followers_url":"https://api.github.com/users/wh0/followers","following_url":"https://api.github.com/users/wh0/following{/other_user}","gists_url":"https://api.github.com/users/wh0/gists{/gist_id}","starred_url":"https://api.github.com/users/wh0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wh0/subscriptions","organizations_url":"https://api.github.com/users/wh0/orgs","repos_url":"https://api.github.com/users/wh0/repos","events_url":"https://api.github.com/users/wh0/events{/privacy}","received_events_url":"https://api.github.com/users/wh0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-11T07:26:54Z","updated_at":"2015-02-11T07:26:54Z","closed_at":null,"body":"When entry points cause virtual method invocation, the dependency checker has no way to know which implementations it needs for those methods. Here's an example.\r\n\r\na base class:\r\n```java\r\npublic abstract class Answerer {\r\n\r\n\tpublic abstract int getAnswer();\r\n\r\n\tpublic static int test(Answerer impl) {\r\n\t\treturn impl.getAnswer();\r\n\t}\r\n\r\n}\r\n```\r\n\r\na derived class:\r\n```java\r\npublic class AnswerImpl extends Answerer {\r\n\r\n\t@Override\r\n\tpublic int getAnswer() {\r\n\t\treturn 5;\r\n\t}\r\n\r\n\tpublic static Answerer createInstance() {\r\n\t\treturn new AnswerImpl();\r\n\t}\r\n\r\n}\r\n```\r\n\r\nSuppose you set `Answerer.test` and `AnswererImpl.createInstance` as entry points. At no point in Java code does any object actually become the receiver of a `getAnswer` call, so there will be no implementation compiled."}}