Open Electrenator opened 6 months ago
Yes, the problem also extends, of course, to use within Node.js.
thread '\<unnamed>' panicked at rust\src\minify\pass1.rs:331:13: assertion failed: cons_expr.returns && alt_expr.returns
Not that that should be surprising, but it may be nice to have that squared away for sanity checking. Also this is me adding my +1.
See just now that this is probably related to #21. Looks like the same problem as they have there
The
rust/src/minify/pass1.rs
file panics at line 422:13 when encountering an if else block. Encountered this on version V0.6.0 while runningRUST_BACKTRACE=1 minify-js-cli --mode module ifElse.js --output ifElse.small.js
. Running that gives the following stack trace;The input file for this was quite a simple JS file;
It paniced becouse of the assertion at the line given within the stacktrace. Which is here in the code;
https://github.com/wilsonzlin/minify-js/blob/d0b2fa9a70abae6d80afd8e34910d932b805d2dc/rust/src/minify/pass1.rs#L331
This failed assertion also persists through to the latest main commit.