diff options
| author | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-19 18:04:38 +0100 |
|---|---|---|
| committer | Edvard Thörnros <edvard.thornros@gmail.com> | 2021-02-19 18:04:38 +0100 |
| commit | fdc57adf5645a27bc26976375bd48b0c5316b9a3 (patch) | |
| tree | c239699f6b8b380b7f25bfca6e769d055f934bd1 /src | |
| parent | 2fa8665203f9e1998c0c3aae6714605f2db2fd4e (diff) | |
| download | sylt-fdc57adf5645a27bc26976375bd48b0c5316b9a3.tar.gz | |
Update src/lib.rs
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -280,7 +280,7 @@ impl VM { Value::Function(ups, block) }, value => error!(self, - ErrorKind::RuntimeTypeError(op, vec![value.clone()]), + ErrorKind::ValueError(op, vec![value.clone()]), format!("Not a function {:?}.", value)), }; self.constants[slot] = constant; @@ -601,7 +601,7 @@ impl VM { let field = self.string(field); if let Value::Instance(ty, _) = inst { - let ty = &self.blobs[ty].fields.get(field).unwrap().1; + let ty = &ty.fields.get(field).unwrap().1; let expected = Type::from(&value); if ty != &expected { error!(self, ErrorKind::TypeMismatch(expected, ty.clone()), |
