-
-
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
Getter + increment haxe.Int64 variable compile error #11605
Comments
Same issue there: static inline function allocUID() : UID {
return (SEQ << (#if hxbit64 64 #else 32 #end - SEQ_BITS)) | (++UID);
} With |
I have no intuition for how accessor + operator overload should interact here. Should this behave the same way as the |
The case of @kLabz is exactly why I open this issue. I'm replacing it locally to continue my dev, with UID += 1;
return (SEQ << (#if hxbit64 64 #else 32 #end - SEQ_BITS)) | (UID); |
@Simn if we have a + operator, we should be able to use x += 1; // x = X.add(x,1)
++x; // same
x++; // { var tmp = x; x = X.add(x,1); tmp; } |
Ok hang on, the specification is really not clear to me. We can have three different kinds of operator overload:
If I'm understanding what you're saying correctly, the following should be true:
Is that correct? Note that I'm not even talking about getters/setters because it seems like the problem here starts even earlier. |
I thought that |
Recently, the following example does not compile, with message "haxe.Int64 should be Int". However, we should be able to increment an
haxe.Int64
value. Without getter or without increment, the code compile correctly.The first bad commit is a57c74c which is also related to the issue about setter and increment #11577
The text was updated successfully, but these errors were encountered: