get rid of spurious warning, add type error for skip_max_list

This commit is contained in:
Mark Thom
2018-05-21 16:20:08 -06:00
parent 4608c4fe58
commit b49c0f5d36
3 changed files with 22 additions and 2 deletions

View File

@@ -1609,6 +1609,18 @@ pub enum IndexPtr {
#[derive(Clone)]
pub struct CodeIndex(pub Rc<RefCell<(IndexPtr, ClauseName)>>);
impl CodeIndex {
pub fn is_undefined(&self) -> bool {
let index_ptr = self.0.borrow().0;
if let IndexPtr::Undefined = index_ptr {
true
} else {
false
}
}
}
#[derive(Clone)]
pub struct ModuleCodeIndex(pub IndexPtr, pub ClauseName);