-
-
Notifications
You must be signed in to change notification settings - Fork 667
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
Forward @:nativeTypeConstraints in closures to class filter #7863
Forward @:nativeTypeConstraints in closures to class filter #7863
Conversation
I am not really familiar (anymore) with this code, and I can't say I fully understand what's going on here, but forwarding constraints makes sense to me and since the tests still pass, it should be fine ;-) Could you maybe add a test for this somehow? |
Sure, I'll look into this :) |
8548000
to
0476073
Compare
Tests have been added and CI passed. The code related to metadata has been rewritten, you might want to review again. |
@Simn could this be considered for 4.0? We would like to switch to official haxe 4.0 when it is available and possibly stick with it for a while for production apps, but our backend cannot work without this fix (or something similar). I can work on this again as much as needed. Edit: just rebased haxe 4 rc2 to get an updated build from appveyor (hopefully) before monday. |
Note: this test was already passing with `@:nativeTypeConstraints` on class Test, but this custom meta is being removed.
fc2c2d8
to
65c521a
Compare
I have some issues with native cs libs using type parameter constraints: while I can generally use them with
@:nativeTypeConstraints
(see #3526), the closures to class filter generates classes without these type constraints, resulting in a successful haxe compilation but a compilation error in C#.This PR does two things:
@:nativeTypeConstraints
meta to these classesDo not hesitate to tell me if my code doesn't make sense or if there are better ways to do it; I'm still not familiar with ocaml / haxe sources.
Related question: should
@:nativeTypeConstraints
become a proper meta? (I could add it to this PR)