haxe icon indicating copy to clipboard operation
haxe copied to clipboard

Analyzer replaces var name in `name = call() ?? "default"` with `tmp` on fusion

Open RblSb opened this issue 1 year ago • 0 comments

class Main {
  static function main() {
    final name = call() ?? "default";
    trace(name);
  }
  
  static function call():String return "";
}

Generation with analyzer:

let tmp = Test.call();
console.log("Test.hx:4:",tmp != null ? tmp : "default");

Without:

let tmp = Test.call();
let name = tmp != null ? tmp : "default";
console.log("Test.hx:4:",name);

Would be nice to replace temp var name on fusion

RblSb avatar Jan 05 '24 00:01 RblSb