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

haxe.ds.ObjectMap with null key #11759

Closed
filt3rek opened this issue Sep 3, 2024 · 1 comment
Closed

haxe.ds.ObjectMap with null key #11759

filt3rek opened this issue Sep 3, 2024 · 1 comment

Comments

@filt3rek
Copy link
Contributor

filt3rek commented Sep 3, 2024

Hej,

Idk if it has already been discussed but having a null key on haxe.ds.ObjectMap works fine on some plateforms and fails with others.
And Idk if it"s ok with that because the answer will be "it"s (stupid) plateform dependant" or if it should work the same way on all plateforms

Here"s a minimal example : https://try.haxe.org/#0a9596a7

class Foo {
	public function new() {}
}

class Test {
	static function main() {
		var h:Map<Foo, Bool> = [null => true];
		trace(h);
	}
}

Works well on Eval and HL but fails on JS and Neko (I haven"t tried on other plateforms because I"ve done that on try.haxe.org)

Called from ? line 1
Called from Test.hx line 7
Uncaught exception - Invalid field access : __id__

Thanks for reading,
Regards,

@Simn
Copy link
Member

Simn commented Sep 3, 2024

This is platform-dependent indeed.

@Simn Simn closed this as completed Sep 3, 2024
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

No branches or pull requests

2 participants