From 866a6d9180e903368100d348c94c8c44ac6d6668 Mon Sep 17 00:00:00 2001 From: dave caruso Date: Thu, 19 Sep 2024 03:18:16 -0700 Subject: [PATCH] fix(bundler): disable moving identifiers (#14033) --- src/js_ast.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js_ast.zig b/src/js_ast.zig index ada8a2a013c21..bbd318cbe6093 100644 --- a/src/js_ast.zig +++ b/src/js_ast.zig @@ -5737,7 +5737,10 @@ pub const Expr = struct { /// outside of a module wrapper (__esm/__commonJS). pub fn canBeMoved(data: Expr.Data) bool { return switch (data) { - .e_identifier => |id| id.can_be_removed_if_unused, + // TODO: identifiers can be removed if unused, however code that + // moves expressions around sometimes does so incorrectly when + // doing destructures. test case: https://github.com/oven-sh/bun/issues/14027 + // .e_identifier => |id| id.can_be_removed_if_unused, .e_class => |class| class.canBeMoved(),