Skip to content
New issue

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

typedefs and @:native/overload #55

Closed
ciscoheat opened this issue Oct 14, 2020 · 2 comments
Closed

typedefs and @:native/overload #55

ciscoheat opened this issue Oct 14, 2020 · 2 comments

Comments

@ciscoheat
Copy link

I've noticed that in some cases, @:native and @:overload are placed in a typedef, so they won't really be used. A quick fix is to make the typedef an external class instead.

@haxiomic
Copy link
Owner

haxiomic commented Oct 15, 2020

This one is deliberate, unfortunately most of the time these cannot be converted to classes because we need structure type unification rules to apply, however right now haxe has no way to have a typedef with non-ascii fields, so some kinds of @:native-like approach is required there. Nakado has implemented support for @:native on typedef, if we're lucky it could arrive in 4.2, if it does then those fields with @:native will start working. There's no ideal work around and it's an ongoing talk in haxe on how best to resolve
See HaxeFoundation/haxe#9433
And HaxeFoundation/haxe#5105

@ciscoheat
Copy link
Author

I see, for now I will convert those few classes to extern, it will be adequate for my needs at the moment. Thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants