mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
ensure numbers without a raw are allocated during codegen (#1950)
This was incorrectly using raw for dynamically generated numbers like in
the minifier (
6e0bd52af1/crates/oxc_minifier/src/compressor/fold.rs (L280)
).
This ensures they are dynamically generated during codegen.
This does not investigate why `just example minifier` does not take the
`if MINIFY` branch.
---------
Co-authored-by: Boshen <boshenc@gmail.com>
This commit is contained in:
parent
bce9060095
commit
ff9cf292dc
1 changed files with 1 additions and 1 deletions
|
|
@ -947,7 +947,7 @@ fn need_space_before_dot<const MINIFY: bool>(bytes: &[u8], p: &mut Codegen<{ MIN
|
|||
impl<'a, const MINIFY: bool> Gen<MINIFY> for NumberLiteral<'a> {
|
||||
#[allow(clippy::cast_sign_loss, clippy::cast_possible_truncation)]
|
||||
fn gen(&self, p: &mut Codegen<{ MINIFY }>, _ctx: Context) {
|
||||
if MINIFY {
|
||||
if MINIFY || self.raw.is_empty() {
|
||||
p.print_space_before_identifier();
|
||||
let abs_value = self.value.abs();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue