Skip to content
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

[hl] Fix NotEq compare nullInt with Int #11629

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

yuxiaomao
Copy link
Contributor

The following code does not return the expected result on local (it print false, false), and this PR fix it.

static function main() {
	var nullInt:Null<Int> = null;
	trace(nullInt != 0); // expect: true
	trace(nullInt != 6); // expect: true
}

However, CI is green and place this code in TestOps.hx does not cause any problem (it print true, true but it shouldn't); try.haxe does not fail either. That's very strange and I don't understand why :(

@Simn
Copy link
Member

Simn commented Apr 5, 2024

This could come from optimization "fixing" it.

@yuxiaomao
Copy link
Contributor Author

Oh! You're right, it produce(d) error when I added @:analyzer(ignore). Just in case I will put it to the class

@yuxiaomao
Copy link
Contributor Author

It seems that github has some connection issues today? I'll try rerun it later

@Simn Simn merged commit c64f5ca into HaxeFoundation:development Apr 5, 2024
50 checks passed
@yuxiaomao yuxiaomao deleted the dev-hlnullintnoteq branch April 5, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants