{"action":"created","issue":{"url":"https://api.github.com/repos/jcoplien/trygve/issues/98","repository_url":"https://api.github.com/repos/jcoplien/trygve","labels_url":"https://api.github.com/repos/jcoplien/trygve/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/jcoplien/trygve/issues/98/comments","events_url":"https://api.github.com/repos/jcoplien/trygve/issues/98/events","html_url":"https://github.com/jcoplien/trygve/issues/98","id":141436907,"number":98,"title":"List<T>.indexOf(T element) runtime error","user":{"login":"hvaldecantos","id":2617944,"avatar_url":"https://avatars.githubusercontent.com/u/2617944?v=3","gravatar_id":"","url":"https://api.github.com/users/hvaldecantos","html_url":"https://github.com/hvaldecantos","followers_url":"https://api.github.com/users/hvaldecantos/followers","following_url":"https://api.github.com/users/hvaldecantos/following{/other_user}","gists_url":"https://api.github.com/users/hvaldecantos/gists{/gist_id}","starred_url":"https://api.github.com/users/hvaldecantos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hvaldecantos/subscriptions","organizations_url":"https://api.github.com/users/hvaldecantos/orgs","repos_url":"https://api.github.com/users/hvaldecantos/repos","events_url":"https://api.github.com/users/hvaldecantos/events{/privacy}","received_events_url":"https://api.github.com/users/hvaldecantos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-16T23:59:46Z","updated_at":"2016-03-17T10:30:14Z","closed_at":null,"body":"The following code compiles:\r\n\r\n```trygve\r\nclass Element {\r\n}\r\n{\r\n    List<Element> elements = new List<Element>()\r\n    Element e1 = new Element()\r\n    \r\n    elements.add(e1)\r\n    int i = elements.indexOf(e1)\r\n    System.out.println(i)\r\n}\r\n```\r\nBut, when invoking `indexOf` the code stops running:\r\n```\r\nCompilation complete\r\nException in thread \"main\" java.lang.ClassCastException: info.fulloo.trygve.run_time.RTObjectCommon cannot be cast to info.fulloo.trygve.run_time.RTObjectCommon$RTIntegerObject\r\n\tat info.fulloo.trygve.add_ons.ListClass$RTIndexOfCode.runDetails(ListClass.java:343)\r\n\tat info.fulloo.trygve.add_ons.ListClass$RTListCommon.run(ListClass.java:204)\r\n\tat info.fulloo.trygve.run_time.RunTimeEnvironment.runner(RunTimeEnvironment.java:381)\r\n\tat info.fulloo.trygve.run_time.RunTimeEnvironment.run(RunTimeEnvironment.java:172)\r\n\tat info.fulloo.trygve.editor.BatchRunner.simpleRun(BatchRunner.java:61)\r\n\tat info.fulloo.trygve.editor.BatchRunner.processBatch(BatchRunner.java:49)\r\n\tat info.fulloo.trygve.editor.Main.main(Main.java:34)\r\n```"},"comment":{"url":"https://api.github.com/repos/jcoplien/trygve/issues/comments/197809201","html_url":"https://github.com/jcoplien/trygve/issues/98#issuecomment-197809201","issue_url":"https://api.github.com/repos/jcoplien/trygve/issues/98","id":197809201,"user":{"login":"jcoplien","id":7209130,"avatar_url":"https://avatars.githubusercontent.com/u/7209130?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoplien","html_url":"https://github.com/jcoplien","followers_url":"https://api.github.com/users/jcoplien/followers","following_url":"https://api.github.com/users/jcoplien/following{/other_user}","gists_url":"https://api.github.com/users/jcoplien/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoplien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoplien/subscriptions","organizations_url":"https://api.github.com/users/jcoplien/orgs","repos_url":"https://api.github.com/users/jcoplien/repos","events_url":"https://api.github.com/users/jcoplien/events{/privacy}","received_events_url":"https://api.github.com/users/jcoplien/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T10:30:13Z","updated_at":"2016-03-17T10:30:13Z","body":"Fixed in 1.6.11"}}