HaxeFoundation / HaxeFoundation/haxe

unconsistent default value across targets in trace.

Open
#3,877 16 comments 1 reaction 1 assignee Claimed by @Simn View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

in that test : http://try.haxe.org/#8Bf77
you can see different behaviors depending on platforms, and basic type, for the default value that is traced.

good thing is that the nullability test is ok, but the traced value is not showing 'null'.
on neko i get expected result: (except for current bug for UInt): every trace shows 'null' value, and every test '== null' is true.

for js target of try haxe: if variables are not nullable, i get undefined value, except for Bool type.
i think its a bit to much Platform specific, and not enough haxe consistent behavior.
And its quite confusing for coder to have a value different from 'null' in trace, and a test '==null' that is true.

i would expect same result for not Null<> variable and for Null<> ones.
what do you think?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.