Better error messages.

This commit is contained in:
Stephen Chung
2021-01-15 17:13:04 +08:00
parent 3f44e2893c
commit 92c7fd9e5b
3 changed files with 15 additions and 14 deletions

View File

@@ -178,8 +178,9 @@ impl fmt::Display for EvalAltResult {
Self::ErrorDotExpr(s, _) if !s.is_empty() => write!(f, "{}", s)?,
Self::ErrorIndexingType(_, _)
| Self::ErrorUnboundThis(_)
Self::ErrorIndexingType(s, _) => write!(f, "Indexer not registered for type '{}'", s)?,
Self::ErrorUnboundThis(_)
| Self::ErrorFor(_)
| Self::ErrorInExpr(_)
| Self::ErrorDotExpr(_, _)