give dynamic predicates a better respect for module bounds

This commit is contained in:
Mark Thom
2019-03-06 00:09:55 -07:00
parent 20e9042350
commit 6439d09733
7 changed files with 142 additions and 47 deletions

View File

@@ -226,7 +226,7 @@ impl Machine {
// ensure we don't try to overwrite an existing predicate from a different module.
if !existing_idx.is_undefined() && !idx.is_undefined() {
// allow the overwriting of user-level predicates by all other predicates.
if existing_idx.module_name() == key.0.owning_module() {
if existing_idx.module_name().as_str() == "user" {
continue;
}