-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
[cpp] extern class with default args generates null args #3955
Comments
james4k
changed the title
[cpp] extern class with default args always generates null args
[cpp] extern class with default args generates null args
Mar 3, 2015
So I think overload is probably the best way to do this, because it will respect the c++ defaults given in the header file (plus it works now)
Otherwise, I think the information might be gone before it gets to hxcpp |
Thanks, this will work well enough for my case. If a fix for this is planned for later, perhaps the Haxe compiler should throw an error here in the meantime. |
james4k
added a commit
to james4k/lime
that referenced
this issue
Apr 8, 2016
Finally made ConsoleRenderContext an extern class, thanks to a workaround to default args not working. @:overload is used in combination with the actual default args specified in the C++ headers. See HaxeFoundation/haxe#3955.
james4k
added a commit
to openfl/lime
that referenced
this issue
Apr 20, 2016
Finally made ConsoleRenderContext an extern class, thanks to a workaround to default args not working. @:overload is used in combination with the actual default args specified in the C++ headers. See HaxeFoundation/haxe#3955.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extern classes with default args seem to generate
null()
for unspecified args in the generated C++.As an example, for the function signature
and a function call
Haxe will generate the C++ of
Full example, though the actual C++ will not build:
The text was updated successfully, but these errors were encountered: