aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/error.rs4
-rw-r--r--src/vm.rs8
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) => {
diff --git a/src/vm.rs b/src/vm.rs
index a1c58d9..468e5df 100644
--- a/src/vm.rs
+++ b/src/vm.rs
@@ -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()));
}
}