Skip to content

Commit 2d3853b

Browse files
committed
Add list subtraction in both places this time
1 parent 9a7ea97 commit 2d3853b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/PatchManager.SassyPatching/Nodes/Expressions/Unary/ImplicitSubtract.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ internal override DataValue GetResult(DataValue leftHandSide, DataValue rightHan
3333
return leftHandSide.Integer - rightHandSide.Real;
3434
}
3535

36+
37+
if (leftHandSide.IsList && rightHandSide.IsList)
38+
{
39+
return leftHandSide.List.Where(x => rightHandSide.List.All(y => x != y)).ToList();
40+
}
41+
42+
3643
throw new BinaryExpressionTypeException(Coordinate,"subtract", leftHandSide.Type.ToString(),
3744
rightHandSide.Type.ToString());
3845
}

0 commit comments

Comments
 (0)