-
-
Notifications
You must be signed in to change notification settings - Fork 662
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] problem with deprecated implicit casts of cpp.Int64 #10998
Comments
Thanks for catching this! I think the ideal is the iterator is typed as Int64 although since it's a platform specific type this is more tricky
It would be better if the depreciation warning worked here |
This issue is slowly getting problematic for me: My HxGodot library makes heavy use of cpp.Int64 due to the way the engine bindings work. Ever since the 4.3.0 release dropped, i experience an incline of user reports for the it would be really awesome if there was support for implicit cpp.Int64 for-loops |
I think I misjudged this one when looking through the issues. Seems fair to consider abstract field casts for the interval operator. |
Reopening for hotfix. |
@Simn Thx a lot for taking a look! |
I wouldn't call it having plans, but I kinda want to design numeric types properly for Haxe 5 in general. |
This is a breaking change that I noticed going from 4.2.5 -> 4.3.x / nightly.
#10133 was not included in the former 4.2.x releases and is included in nightly now.
I compiled a demonstration here: https://gist.github.com/dazKind/8a916288a9b4bdcf8b64ae6d2eee1265
While I agree that being explicit about truncation is a good thing, it totally breaks when you try to use implicit truncation in a for-loop. I would have assumed to get the deprecation warning here for the moment.
I also tried to explicitly iterate an int64 range using the normal for-loop syntax but that also assumes Int (32 bits) and doesnt work.
Ofc im not sure about the implications but maybe having a
for (i in 0...someInt64)
should default to typing the iterator to int64 and not assume int32 by default, given that an explicittoInt()
will be required in the future.The text was updated successfully, but these errors were encountered: