HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.03k stars 648 forks source link

Null conditional bind does nothing #11571

Open fourst4r opened 4 months ago

fourst4r commented 4 months ago
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.

Simn commented 4 months ago

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