From c4ad21307a240f21aeae45aa9ea16f0f048400d6 Mon Sep 17 00:00:00 2001 From: magic-akari Date: Fri, 8 Sep 2023 00:22:04 +0800 Subject: [PATCH] fix: enum --- crates/swc_ecma_transforms_typescript/src/ts_enum.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/swc_ecma_transforms_typescript/src/ts_enum.rs b/crates/swc_ecma_transforms_typescript/src/ts_enum.rs index c64661ae6dc9b..0cfedb03b4522 100644 --- a/crates/swc_ecma_transforms_typescript/src/ts_enum.rs +++ b/crates/swc_ecma_transforms_typescript/src/ts_enum.rs @@ -199,7 +199,7 @@ impl<'a> EnumValueComputer<'a> { op!(">>>") => (left.trunc() as u32).wrapping_shr(right.trunc() as u32) as f64, op!("|") => ((left.trunc() as i32) | (right.trunc() as i32)) as f64, op!("&") => ((left.trunc() as i32) & (right.trunc() as i32)) as f64, - op!("^") => ((left.trunc() as i32) | (right.trunc() as i32)) as f64, + op!("^") => ((left.trunc() as i32) ^ (right.trunc() as i32)) as f64, _ => unreachable!(), };