HaxeFoundation / HaxeFoundation/haxe

`??` message clarity and/or specification

Open
#12,622 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

```haxe
function main() {
Std.parseFloat("") ?? 1.0; // On static platforms, null can't be used as basic type Float
}
```

It's good that this fails, but the message isn't very clear because there's no visible `null` here. Can we detect this during typing and fail in a nicer way or will that anger the semantics crowd again?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Haxe snippet and reading how the compiler reports the `??` expression when `Std.parseFloat("")` is used with `Float`. Trace the typing and diagnostic path mentioned in the issue; done when the failure clearly explains the implicit nullability problem and the intended behavior is settled.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.