-
-
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
Some operator tests related to Null<T>
#8426
Conversation
(F for failure) Flash 9 on Linux shows at least the failures above without displaying the total count; on OS X it shows the total number of failures (24) without displaying the specific lines … It is probably the same as HL. |
@hughsando Could you check cppia? It should align with cpp. @Aurel300 Could you resolve the conflict? |
cppia confirmed fixed, I've updated the table. I think we should fix Java/C#/HL, but I'm not sure how easy this is to fix. I'm tentatively setting this to 4.0. I'll look into Java myself, but I'll need help with C# and HL (@kLabz and @ncannasse). |
Actually pinging @nadako as well because the flash behavior might bite them. |
@waneck Any pointers to where this is handled? The problem here is that when doing |
@Simn it seems to be handled there: https://github.com/HaxeFoundation/haxe/blob/development/src/codegen/gencommon/hardNullableSynf.ml#L173 I get some results with a simple test, but break many things because it's just a naive one. I get:
instead of:
|
For these cases we have to generate If both operands are nullable it has to be There might also be evaluation order concerns if the rhs is the nullable one... |
I had a look like this but gencommon is too much for me to handle in this heat. Will maybe look at it again later... |
Maybe we should just unspecify class Main {
static var i:Int = null; // or `Null<Int>` no difference for dynamic targets
public static function main():Void {
i = null;
trace(i == 0);
trace(i < 0);
trace(i > 0);
trace(i >= 0);
trace(i <= 0);
}
} python throws
But if I comment out
Also null safety emits a compile time errors for |
I think we should keep the spec defined by the provided unit tests for comparisons - for static targets at least - since they will match most dynamic targets specification (js in particular). |
I have some trouble parsing what you mean here exactly. So, what do you mean here exactly? |
# Conflicts: # tests/runci/targets/Flash.hx
In 2024, HL still fails many of the comparison tests against |
Fixed by #11612 |
I'm not 100% positive that all these conform to the spec, but I'd like to get an overview of where we're at.
Related: #8367