haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Null conditional bind does nothing

Open fourst4r opened this issue 1 year ago • 1 comments

function main() {
    var p:Null<()->String> = () -> "ok";
    trace(p?.bind()());
}

https://try.haxe.org/#070F275b

Looking at the generated js you can see that no null check gets inserted for a ?.bind operation.

fourst4r avatar Feb 10 '24 06:02 fourst4r

Oh so that's what these efk_todo in typer.ml are about...

Simn avatar Feb 10 '24 18:02 Simn