summaryrefslogtreecommitdiff
path: root/src/eval/ops.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/ops.rs')
-rw-r--r--src/eval/ops.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eval/ops.rs b/src/eval/ops.rs
index 3e397c30..bea2ea82 100644
--- a/src/eval/ops.rs
+++ b/src/eval/ops.rs
@@ -209,8 +209,8 @@ pub fn mul(lhs: Value, rhs: Value) -> StrResult<Value> {
(Int(a), Str(b)) => Str(b.repeat(a)?),
(Array(a), Int(b)) => Array(a.repeat(b)?),
(Int(a), Array(b)) => Array(b.repeat(a)?),
- (Content(a), Int(b)) => Content(a.repeat(b)?),
- (Int(a), Content(b)) => Content(b.repeat(a)?),
+ (Content(a), b @ Int(_)) => Content(a.repeat(b.cast()?)),
+ (a @ Int(_), Content(b)) => Content(b.repeat(a.cast()?)),
(a, b) => mismatch!("cannot multiply {} with {}", a, b),
})