Skip to content

Commit

Permalink
Improve error
Browse files Browse the repository at this point in the history
  • Loading branch information
voltrevo committed Jun 28, 2023
1 parent 0a840c0 commit aab67fd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion valuescript_vm/src/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,16 @@ pub fn op_eq_impl(left: &Val, right: &Val) -> Result<bool, Val> {
(Val::Number(left_number), Val::Number(right_number)) => left_number == right_number,
(Val::String(left_string), Val::String(right_string)) => left_string == right_string,
(Val::BigInt(left_bigint), Val::BigInt(right_bigint)) => left_bigint == right_bigint,
_ => return Err("TODO: op== with other types".to_error()),
_ => {
return Err(
format!(
"TODO: op== with other types ({}, {})",
left.codify(),
right.codify()
)
.to_error(),
)
}
})
}

Expand Down

0 comments on commit aab67fd

Please sign in to comment.