Skip to content

Commit

Permalink
fix(evaluator): better error message for type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
CertainLach committed Aug 26, 2020
1 parent 21c8e9b commit 6cb98c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/jrsonnet-evaluator/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub enum Error {

#[error("variable is not defined: {0}")]
VariableIsNotDefined(Rc<str>),
#[error("type mismatch: expected {2}, got {1:?} {0}")]
#[error("type mismatch: expected {}, got {2} {0}", .1.iter().map(|e| format!("{}", e)).collect::<Vec<_>>().join(", "))]
TypeMismatch(&'static str, Vec<ValType>, ValType),
#[error("no such field: {0}")]
NoSuchField(Rc<str>),
Expand Down

0 comments on commit 6cb98c9

Please sign in to comment.