diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-18 20:06:29 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-19 18:02:45 +0100 |
| commit | 2fa8665203f9e1998c0c3aae6714605f2db2fd4e (patch) | |
| tree | 79826c37394b4bea6e82718bc123531b0040bb30 /src | |
| parent | 0968d7a4c7a9c4daf90b18de51cac08ce199f142 (diff) | |
| download | sylt-2fa8665203f9e1998c0c3aae6714605f2db2fd4e.tar.gz | |
UnkownField -> UnknownField
Diffstat (limited to 'src')
| -rw-r--r-- | src/error.rs | 4 | ||||
| -rw-r--r-- | src/vm.rs | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/error.rs b/src/error.rs index b897c80..c2ad228 100644 --- a/src/error.rs +++ b/src/error.rs @@ -20,7 +20,7 @@ pub enum ErrorKind { /// (External function, parameters) ExternTypeMismatch(String, Vec<Type>), ValueError(Op, Vec<Value>), - UnkownField(Value, String), + UnknownField(Value, String), ArgumentCount(usize, usize), /// (Indexed value, length, index) @@ -96,7 +96,7 @@ impl fmt::Display for ErrorKind { ErrorKind::IndexError(value, slot) => { write!(f, "Cannot index value '{:?}' with type '{:?}'.", value, slot) } - ErrorKind::UnkownField(obj, field) => { + ErrorKind::UnknownField(obj, field) => { write!(f, "Cannot find field '{}' on {:?}", field, obj) } ErrorKind::ArgumentCount(expected, given) => { @@ -313,7 +313,7 @@ impl VM { let slot = ty.fields.get(field).unwrap().0; self.push(values.borrow()[slot].clone()); } else { - error!(self, ErrorKind::UnkownField(inst, field.clone())); + error!(self, ErrorKind::UnknownField(inst, field.clone())); } } @@ -324,7 +324,7 @@ impl VM { let slot = ty.fields.get(field).unwrap().0; values.borrow_mut()[slot] = value; } else { - error!(self, ErrorKind::UnkownField(inst, field.clone())); + error!(self, ErrorKind::UnknownField(inst, field.clone())); } } @@ -592,7 +592,7 @@ impl VM { } else { let field = field.clone(); self.push(Value::Nil); - error!(self, ErrorKind::UnkownField(inst, field)); + error!(self, ErrorKind::UnknownField(inst, field)); } } @@ -608,7 +608,7 @@ impl VM { "Types of field and variable do not match."); } } else { - error!(self, ErrorKind::UnkownField(inst, field.clone())); + error!(self, ErrorKind::UnknownField(inst, field.clone())); } } |
