{"id":22190028,"url":"https://github.com/elitemastereric/issue11054","last_synced_at":"2025-07-07T13:37:51.841Z","repository":{"id":206135416,"uuid":"715933360","full_name":"EliteMasterEric/Issue11054","owner":"EliteMasterEric","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-19T02:27:39.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-30T00:46:34.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EliteMasterEric.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-08T06:00:00.000Z","updated_at":"2023-11-08T06:00:08.000Z","dependencies_parsed_at":"2023-11-19T03:23:07.762Z","dependency_job_id":null,"html_url":"https://github.com/EliteMasterEric/Issue11054","commit_stats":null,"previous_names":["elitemastereric/issue11054"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliteMasterEric%2FIssue11054","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliteMasterEric%2FIssue11054/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliteMasterEric%2FIssue11054/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliteMasterEric%2FIssue11054/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EliteMasterEric","download_url":"https://codeload.github.com/EliteMasterEric/Issue11054/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245346608,"owners_count":20600344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T11:41:52.944Z","updated_at":"2025-03-24T20:28:53.923Z","avatar_url":"https://github.com/EliteMasterEric.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hxjvm-Issue11054\n\nhttps://github.com/HaxeFoundation/haxe/issues/11054\n\n**Build instructions:**\n\n1. Build the extern JAR: `cd ./project; ./build.bat`\n2. Build the Haxe project: `haxe ./compile.hxml`\n3. Run the extern JAR to preview the expected output: `cd ./project/out; java test.TestClass`\n4. Run the Haxe output JAR to see the erroneous output: `cd ./bin/java; java -jar Main.jar`\n\n**Expected Output**\n```\nRobot.performTask() called!\nResult: 7\nRobot.performTask() called!\nResult: -1\nRobot.performTask() called!\nHello, Robot!\n```\n\n**Erroneous Output**\n```\nRobot.performTask() called!\nResult: 7\nRobot.performTask() called!\nResult: -1\nException in thread \"main\" java.lang.ClassCastException: class haxe.root.Main$Closure_main_1 cannot be cast to class test.Robot$GreetRobot (haxe.root.Main$Closure_main_1 and test.Robot$GreetRobot are in unnamed module of loader 'app')\n        at test.RobotFactory$2.performTask(RobotFactory.java:19)\n        at haxe.root.Main.main(src/Main.hx:16)\n        at haxe.root.Main.main(src/Main.hx:1)\n```\n\n**Notes**\n\nInspecting with a Java decompiler like Luyten reveals that `Main_add` and `Closure_main_0` (the auto-generated `Function` classes used for the functional interface) both implement `Robot.MathOperation`.\n\nHowever, `Closure_main_1` does not implement `Robot.GreetRobot`, only `java.util.function.Function`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felitemastereric%2Fissue11054","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felitemastereric%2Fissue11054","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felitemastereric%2Fissue11054/lists"}