The following code runs in other targets (tested on Neko, Python, JS), but fails on the Java target.
package test;
class MyTest {
@:keep
public static function testFunction() {
trace("Hello World!");
}
@:keep
public static var testField = 0;
public static function main() {
for (fieldName in Reflect.fields(MyTest)) {
if(StringTools.startsWith(fieldName, "test")) {
var theFunc = Reflect.field(MyTest, fieldName);
if (Reflect.isFunction(theFunc)) {
theFunc();
}
}
}
}
}
The following exepction is thrown:
Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to haxe.lang.Function
The following code runs in other targets (tested on Neko, Python, JS), but fails on the Java target.
The following exepction is thrown: