diff options
author | 2023-04-20 23:57:26 -0700 | |
---|---|---|
committer | 2023-04-20 23:57:44 -0700 | |
commit | 541d16f8bed5f51a9861419d7273e733dae56549 (patch) | |
tree | 835e524ed78722ffcfb80c5e4227992a704aa3dc /src/js_ast.zig | |
parent | b609f9be2894f5237a0d058eaea884f330f02f77 (diff) | |
download | bun-541d16f8bed5f51a9861419d7273e733dae56549.tar.gz bun-541d16f8bed5f51a9861419d7273e733dae56549.tar.zst bun-541d16f8bed5f51a9861419d7273e733dae56549.zip |
Fix bug with merging adjacent vars
Diffstat (limited to 'src/js_ast.zig')
-rw-r--r-- | src/js_ast.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/js_ast.zig b/src/js_ast.zig index 2f0d8ddd6..dbd0fb010 100644 --- a/src/js_ast.zig +++ b/src/js_ast.zig @@ -5269,6 +5269,11 @@ pub const S = struct { was_commonjs_export: bool = false, + pub fn canMergeWith(this: *const Local, other: *const Local) bool { + return this.kind == other.kind and this.is_export == other.is_export and + this.was_commonjs_export == other.was_commonjs_export; + } + pub const Kind = enum(u2) { k_var, k_let, |