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

@@ -57,7 +57,10 @@ impl<'a> SubModuleUser for MachineCodeIndex<'a> {
fn insert_dir_entry(&mut self, name: ClauseName, arity: usize, idx: ModuleCodeIndex) {
if let Some(ref mut code_idx) = self.code_dir.get_mut(&(name.clone(), arity)) {
println!("warning: overwriting {}/{}", &name, arity);
if !code_idx.is_undefined() {
println!("warning: overwriting {}/{}", &name, arity);
}
set_code_index!(code_idx, idx.0, idx.1);
return;