haxe icon indicating copy to clipboard operation
haxe copied to clipboard

hashlink try catch set bug

Open PXshadow opened this issue 1 year ago • 4 comments

var b = 10;

function main() {
  var x = 0;
  try {
    x = b;
    throw "hi";
  }catch(_) {
    trace(x);
  }
}

Returns 0, expected 10

https://try.haxe.org/#806c75c6 Haxe latest

PXshadow avatar Jan 05 '24 14:01 PXshadow

Could you try with -D hl_no_opt?

Simn avatar Jan 05 '24 14:01 Simn

Sounds like #9174 And yeah seems to be a hl-opt issue

kLabz avatar Jan 05 '24 15:01 kLabz

That one was about nested try/catch though, while this seems really basic... Maybe something else for @yuxiaomao to check out.

Simn avatar Jan 05 '24 15:01 Simn

Could you try with -D hl_no_opt?

Passes with -D hl_no_opt

PXshadow avatar Jan 05 '24 17:01 PXshadow