Browse Source

Remove invalid optimization in addition (#2387)

This Pull Request changes the following:

- Remove invalid optimization in addition where `ToPrimitive` calls where skipped.
pull/2391/head
raskad 2 years ago
parent
commit
f446c0970f
  1. 2
      boa_engine/src/value/operations.rs

2
boa_engine/src/value/operations.rs

@ -25,8 +25,6 @@ impl JsValue {
// String concat // String concat
(Self::String(ref x), Self::String(ref y)) => Self::from(js_string!(x, y)), (Self::String(ref x), Self::String(ref y)) => Self::from(js_string!(x, y)),
(Self::String(ref x), y) => Self::from(js_string!(x, &y.to_string(context)?)),
(x, Self::String(ref y)) => Self::from(js_string!(&x.to_string(context)?, y)),
// Slow path: // Slow path:
(_, _) => match ( (_, _) => match (

Loading…
Cancel
Save