warn when overwriting a predicate (#848)

This commit is contained in:
Mark Thom
2021-03-02 11:43:47 -07:00
parent 5976e2d873
commit 7ea9706c94
2 changed files with 23 additions and 3 deletions

View File

@@ -35,7 +35,6 @@ pub(super) fn set_code_index(
code_index.set(code_ptr);
RetractionRecord::AddedUserPredicate(key)
} else {
// TODO: emit warning about overwriting previous record
let replaced = code_index.replace(code_ptr);
RetractionRecord::ReplacedUserPredicate(key, replaced)
}
@@ -45,7 +44,6 @@ pub(super) fn set_code_index(
code_index.set(code_ptr);
RetractionRecord::AddedModulePredicate(module_name.clone(), key)
} else {
// TODO: emit warning about overwriting previous record
let replaced = code_index.replace(code_ptr);
RetractionRecord::ReplacedModulePredicate(module_name.clone(), key, replaced)
}