(self)
| 232 | } |
| 233 | |
| 234 | pub fn as_class(self) -> Result<GcRefLock<'gc, Class<'gc>>, VmError> { |
| 235 | match self { |
| 236 | Value::Class(class) => Ok(class), |
| 237 | v => Err(VmError::RuntimeError(format!( |
| 238 | "cannot convert to class, the value is {v}" |
| 239 | ))), |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | pub fn is_error(&self) -> bool { |
| 244 | match self { |
no test coverage detected