HaxeFoundation / HaxeFoundation/haxe

[interp] Std.string((null:UInt)) throws

Open
#12,975 0 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

Just run `Std.string((null : UInt))` 👉 `Uncaught exception Invalid operation: null + 0`

(same in nightly `Std.string((null : haxe.UInt32))`)

Since eval is not a static target and the compiler actually allows null value for UInt, I think Std.string should produce `"null"` for it?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with `Std.string((null : UInt))` in the eval interpreter, then compare it with `Std.string((null : haxe.UInt32))` in nightly. Trace the `Std.string` handling for UInt values; done means both cases return the string `"null"` without throwing an invalid-operation exception.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.