diff --git a/src/value/ops.rs b/src/value/ops.rs index d030f3c..43d9dd6 100644 --- a/src/value/ops.rs +++ b/src/value/ops.rs @@ -9,6 +9,8 @@ impl Value { pub fn add(self, mut other: Self, span: Span) -> SassResult { if let Self::Paren(..) = other { other = other.eval(span)?.node + } else if let Self::UnaryOp(..) = other { + other = other.eval(span)?.node } let precedence = Op::Plus.precedence(); Ok(match self { diff --git a/tests/addition.rs b/tests/addition.rs index ab5a45b..1db8376 100644 --- a/tests/addition.rs +++ b/tests/addition.rs @@ -263,3 +263,8 @@ test!( "a {\n color: 1 + false;\n}\n", "a {\n color: 1false;\n}\n" ); +test!( + num_plus_unary_not, + "a {\n color: 1 + not 2;\n}\n", + "a {\n color: 1false;\n}\n" +);