aboutsummaryrefslogtreecommitdiff
path: root/src/js_ast.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/js_ast.zig')
-rw-r--r--src/js_ast.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/js_ast.zig b/src/js_ast.zig
index f8adaa953..d3f908fd0 100644
--- a/src/js_ast.zig
+++ b/src/js_ast.zig
@@ -2526,6 +2526,16 @@ pub const Expr = struct {
}, this.loc);
}
+ pub fn canBeInlinedFromPropertyAccess(this: Expr) bool {
+ return switch (this.data) {
+ // if the array has a spread we must keep it
+ // https://github.com/oven-sh/bun/issues/2594
+ .e_spread => false,
+
+ .e_missing => false,
+ else => true,
+ };
+ }
pub fn canBeConstValue(this: Expr) bool {
return this.data.canBeConstValue();
}