Skip to content

Instantly share code, notes, and snippets.

@deathbeam
Created November 13, 2015 15:03
Show Gist options
  • Save deathbeam/97a3cfeae7b621da6087 to your computer and use it in GitHub Desktop.
Save deathbeam/97a3cfeae7b621da6087 to your computer and use it in GitHub Desktop.
class Test {
@:keep public static function main() {
if(Reflect.hasField(Test2, "main")) {
Reflect.callMethod(Test2, Reflect.field(Test2, "main"), []);
}
trace("Haxe is great!");
}
}
class Test2 {
@:keep public static function main() {
trace("Dynamic");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment