We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As discussed in Slack...
class A<T> { var a:java.NativeArray<T>; public function new() { a = new java.NativeArray(10); } public inline function get(i:Int):T { return a[i]; } } class Main { static function main() { var a = new A<Int>(); Sys.println(a.get(0)); } }
Generated Java:
public static void main() { //line 14 "d:\\Code\\playground\\src\\Main.hx" haxe.root.A<java.lang.Object> a = new haxe.root.A<java.lang.Object>(); //line 15 "d:\\Code\\playground\\src\\Main.hx" java.lang.System.out.println(((java.lang.Object) (((int[]) (((java.lang.Object[]) (a.a) )) )[0]) )); }
This fails compiling with:
src\haxe\root\Main.java:39: error: incompatible types: Object[] cannot be converted to int[] java.lang.System.out.println(((java.lang.Object) (((int[]) (((java.lang.Object[]) (a.a) )) )[0]) ));
The text was updated successfully, but these errors were encountered:
[cs] don't run test for #5747 when -D erase_generics for now (seems t…
3fe3fab
…o be an instance of #5748)
It seems like it's not Java-specific, because I got pretty much the same issue with C# when -D erase-generics (see 3fe3fab).
Sorry, something went wrong.
This is also #3398.
waneck
No branches or pull requests
As discussed in Slack...
Generated Java:
This fails compiling with:
The text was updated successfully, but these errors were encountered: